diff --git a/.env.template b/.env.template index 7dd22c4..5dff6f3 100644 --- a/.env.template +++ b/.env.template @@ -7,4 +7,5 @@ MINIO_VERSION=latest MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin MONGO_ROOT_USER=mongoroot -MONGO_ROOT_PASSWORD=mongoroot \ No newline at end of file +MONGO_ROOT_PASSWORD=mongoroot +NEXT_PUBLIC_API_URL= \ No newline at end of file diff --git a/docker-compose.base.yaml b/docker-compose.base.yaml index 3d31037..46680bd 100644 --- a/docker-compose.base.yaml +++ b/docker-compose.base.yaml @@ -6,19 +6,14 @@ services: restart: always ports: - 3000:3000 - # Set environment variables directly in the docker-compose file environment: - ENV_VARIABLE: ${ENV_VARIABLE} - NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} + NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL} worker: image: ghcr.io/jank1310/datadolphin:latest command: node /app/worker/worker.js - restart: - always - # Set environment variables directly in the docker-compose file + restart: always environment: - ENV_VARIABLE: ${ENV_VARIABLE} - NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE} + NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL} # STORAGE minio: image: minio/minio:${MINIO_VERSION} diff --git a/docker-compose.yaml b/docker-compose.yaml index d26be13..20deb55 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,24 +3,16 @@ version: "3.7" services: app: extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: app worker-1: extends: - file: docker-compose.yml - service: worker - worker-2: - extends: - file: docker-compose.yml - service: worker - worker-3: - extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: worker # STORAGE minio: extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: minio environment: MINIO_ROOT_USER: ${MINIO_ROOT_USER} @@ -29,7 +21,7 @@ services: - miniostorage:/data temporal-postgresql: extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: temporal-postgresql environment: POSTGRES_USER: ${POSTGRES_USER} @@ -37,10 +29,10 @@ services: networks: - temporal-network volumes: - - postgresql:/var/lib/postgresql/data + - temporal-postgresql:/var/lib/postgresql/data mongodb: extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: mongodb environment: MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER} @@ -50,7 +42,7 @@ services: # TEMPORAL temporal: extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: temporal networks: - temporal-network @@ -59,11 +51,11 @@ services: - DB_PORT=5432 - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PWD=${POSTGRES_PASSWORD} - - POSTGRES_SEEDS=postgresql + - POSTGRES_SEEDS=temporal-postgresql - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml temporal-ui: extends: - file: docker-compose.yml + file: docker-compose.base.yaml service: temporal-ui environment: - TEMPORAL_ADDRESS=temporal:7233