Skip to content

Commit

Permalink
fix: temporarily bundle minio in prod until minio instance profile
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 25, 2024
1 parent c9a7942 commit 9308ecf
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
30 changes: 30 additions & 0 deletions docker-compose.main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ volumes:
name: fmtm-frontend-main
fmtm_db_data:
name: fmtm-db-data-main
fmtm_data:
name: fmtm-s3-data-main
fmtm_logs:
name: fmtm-logs-main
fmtm_images:
Expand All @@ -47,6 +49,8 @@ services:
condition: service_started
certbot:
condition: service_completed_successfully
s3:
condition: service_started
ui:
condition: service_completed_successfully
volumes:
Expand All @@ -56,6 +60,7 @@ services:
environment:
FMTM_DOMAIN: ${FMTM_DOMAIN}
FMTM_API_DOMAIN: ${FMTM_API_DOMAIN:-api.${FMTM_DOMAIN}}
FMTM_S3_DOMAIN: ${FMTM_S3_DOMAIN:-s3.${FMTM_DOMAIN}}
ports:
- 80:80
- 443:443
Expand All @@ -73,6 +78,8 @@ services:
condition: service_healthy
migrations:
condition: service_completed_successfully
s3:
condition: service_healthy
env_file:
- .env
networks:
Expand Down Expand Up @@ -103,6 +110,26 @@ services:
network_mode: none
restart: "on-failure:2"

s3:
image: "docker.io/minio/minio:${MINIO_TAG:-RELEASE.2024-01-01T16-36-33Z}"
environment:
MINIO_ROOT_USER: ${S3_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY}
MINIO_VOLUMES: "/mnt/data"
MINIO_BROWSER: "off"
volumes:
- fmtm_data:/mnt/data
networks:
- fmtm-net
command: minio server
restart: "unless-stopped"
healthcheck:
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1
interval: 5s
retries: 3
start_period: 5s
timeout: 5s

fmtm-db:
image: "postgis/postgis:${POSTGIS_TAG:-14-3.4-alpine}"
volumes:
Expand All @@ -128,6 +155,8 @@ services:
depends_on:
fmtm-db:
condition: service_healthy
s3:
condition: service_healthy
env_file:
- .env
networks:
Expand Down Expand Up @@ -161,6 +190,7 @@ services:
environment:
FMTM_DOMAIN: ${FMTM_DOMAIN}
FMTM_API_DOMAIN: ${FMTM_API_DOMAIN:-api.${FMTM_DOMAIN}}
FMTM_S3_DOMAIN: ${FMTM_S3_DOMAIN:-s3.${FMTM_DOMAIN}}
CERT_EMAIL: ${CERT_EMAIL}
ports:
- 80:80
Expand Down
8 changes: 4 additions & 4 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,27 @@ COPY container-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
COPY templates/cert-init/fmtm.conf.template \
templates/cert-init/api.conf.template \
templates/cert-init/minio.conf.template \
/etc/nginx/templates/



FROM certs-init-main as certs-init-development
COPY templates/cert-init/odk.conf.template \
templates/cert-init/minio.conf.template \
/etc/nginx/templates/



FROM base as main
# API & Frontend only
# API, Frontend, S3
COPY templates/fmtm.conf.template \
templates/api.conf.template \
templates/minio.conf.template \
/etc/nginx/templates/



FROM main as development
# API, Frontend, ODK, S3
# API, Frontend, S3 + ODK
COPY templates/odk.conf.template \
templates/minio.conf.template \
/etc/nginx/templates/

0 comments on commit 9308ecf

Please sign in to comment.