From 998594f689a534d70700827ea490f64ae58b1f3e Mon Sep 17 00:00:00 2001 From: tobias Date: Sat, 15 Jun 2024 13:14:39 +0200 Subject: [PATCH] Update drone & compose for nextload --- .drone.yml | 17 +---------------- Dockerfile | 2 +- docker-compose.prod.yml | 12 ++++++------ 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2f52b6b..9ca95a1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,22 +11,7 @@ steps: auto_tag: true registry: git.autonomic.zone dockerfile: ./Dockerfile - ## Modify anchor - repo: git.autonomic.zone/autonomic-cooperative/nextload-builder - target: builder - - - name: publish nextload runner container - image: plugins/docker - settings: - username: 3wordchant - password: - from_secret: git_autonomic_zone_token_3wc - auto_tag: true - registry: git.autonomic.zone - dockerfile: ./Dockerfile - ## Modify anchor - repo: git.autonomic.zone/autonomic-cooperative/nextload-runner - target: runner + repo: git.autonomic.zone/autonomic-cooperative/nextload - name: deploy stack image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest diff --git a/Dockerfile b/Dockerfile index 5300528..21c1845 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,6 @@ COPY --from=builder /builder/.next/static ./.next/static COPY --from=builder /builder/public ./public COPY --from=builder /builder/next.config.mjs ./ -#FROM runner as server +FROM runner as server EXPOSE 3000 CMD ["pnpm", "start:standalone"] diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index c67429a..24f8068 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -2,12 +2,12 @@ version: "3.8" services: - payload: + nextjs: image: git.autonomic.zone/autonomic-cooperative/nextload:latest environment: - "NAME=${STACK_NAME}" + # Payload stuff propably not needed as the local API is used? - "PAYLOAD_URL" - - "PAYLOAD_PORT=3001" - "PAYLOAD_SECRET_FILE=/run/secrets/payload_secret" - "MONGODB_USER=mongo" - "MONGODB_HOST=${STACK_NAME}_mongo" @@ -31,11 +31,11 @@ services: order: start-first labels: - "traefik.enable=true" - - "traefik.http.services.${STACK_NAME}-payload.loadbalancer.server.port=3001" + - "traefik.http.services.${STACK_NAME}-nextload.loadbalancer.server.port=3000" # FIXME switch to /admin probably using PathPrefix - - "traefik.http.routers.${STACK_NAME}-payload.rule=Host(`admin.${DOMAIN}`)" - - "traefik.http.routers.${STACK_NAME}-payload.entrypoints=web-secure" - - "traefik.http.routers.${STACK_NAME}-payload.tls.certresolver=production" + - "traefik.http.routers.${STACK_NAME}-nextload.rule=Host(`${DOMAIN}`)" + - "traefik.http.routers.${STACK_NAME}-nextload.entrypoints=web-secure" + - "traefik.http.routers.${STACK_NAME}-nextload.tls.certresolver=production" mongo: image: mongo:6.0.5