From f59d5ce196a21c63d89cd18821558667159cb538 Mon Sep 17 00:00:00 2001 From: BPierrick Date: Wed, 15 Dec 2021 13:57:16 +0100 Subject: [PATCH] chore: setup env --- .env.template | 21 +++++++++++++++++++++ docker-compose.yaml | 12 ++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .env.template diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..5dcaa73 --- /dev/null +++ b/.env.template @@ -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 \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index b47668e..a7c6c2d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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 @@ -54,7 +54,7 @@ services: volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: - - "9000:9000" + - "9000:${MINIO_PORT}" - "9001:9001" depends_on: - minio1