Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Commit

Permalink
chore: setup env
Browse files Browse the repository at this point in the history
  • Loading branch information
BPierrick committed Jan 3, 2022
1 parent a148d38 commit f59d5ce
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
21 changes: 21 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# React constants
REACT_APP_API_URL=fhir_api_url
# REACT_APP_FHIR_API_AUTH_TOKEN=token

# DB Credentials
POSTGRES_HOST=host
POSTGRES_PORT=5432
POSTGRES_DB=db
POSTGRES_LOGIN=login
POSTGRES_PASSWORD=password

# MinIO Credentials
MINIO_PORT=port
MINIO_ENDPOINT=minio_endpoint
# Should be of length >= 3
MINIO_ACCESS_KEY=minio_access_key
# Should be of length >= 8
MINIO_SECRET_KEY=minio_secret_key

# MinIO Constants
BUCKET_NAME=bucket_name
12 changes: 6 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ x-minio-common: &minio-common
image: quay.io/minio/minio:RELEASE.2021-12-09T06-19-41Z
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
expose:
- "9000"
- ${MINIO_PORT}
- "9001"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
MINIO_ROOT_USER: ${MINIO_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
test: ["CMD", "curl", "-f", "http://localhost:${MINIO_PORT}/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3

# starts 4 docker containers running minio server instances.
# using nginx reverse proxy, load balancing, you can access
# it through port 9000.
# it through port MINIO_PORT.
services:
minio1:
<<: *minio-common
Expand Down Expand Up @@ -54,7 +54,7 @@ services:
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
- "9000:${MINIO_PORT}"
- "9001:9001"
depends_on:
- minio1
Expand Down

0 comments on commit f59d5ce

Please sign in to comment.