diff --git a/.drone.yml b/.drone.yml index 7a1cfbb..b352f6e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -40,6 +40,7 @@ steps: SECRET_PAYLOAD_SECRET_VERSION: v1 SECRET_TOKEN_VERSION: v1 SECRET_MONGO_PASSWORD_VERSION: v1 + NGINX_CONF_VERSION: v1 depends_on: - publish astro container - publish payload container diff --git a/astro/Dockerfile b/astro/Dockerfile index e897023..55e04e8 100644 --- a/astro/Dockerfile +++ b/astro/Dockerfile @@ -14,9 +14,3 @@ ENV NODE_ENV=production WORKDIR /build COPY --from=base /base . ADD "https://random-uuid.deno.dev" skipcache -RUN yarn build - -FROM nginx:stable AS prod -COPY nginx.conf /etc/nginx/nginx.conf -COPY --from=build /build/dist /usr/share/nginx/html -EXPOSE 3000 \ No newline at end of file diff --git a/compose.yml b/compose.yml index 6da96c0..e0dc034 100644 --- a/compose.yml +++ b/compose.yml @@ -3,15 +3,14 @@ version: "3.8" services: app: - image: git.autonomic.zone/autonomic-cooperative/justice-equity-technology-astro:latest - environment: - - PAYLOAD_URL=${STACK_NAME}_payload - secrets: - - mongo_password - - payload_secret + image: nginx:1.26.0 networks: - proxy - - internal + volumes: + - html_content:/usr/share/nginx/html + configs: + - source: nginx_default_conf + target: /etc/nginx/conf.d/default.conf deploy: update_config: failure_action: rollback @@ -87,3 +86,10 @@ secrets: volumes: mongo: + html_content: + +configs: + nginx_conf: + name: ${STACK_NAME}_nginx_conf_${NGINX_CONF_VERSION} + file: astro/nginx.conf + template_driver: golang