From 79e3429ea8fb590f82b11f2b19a26427f2d1da4f Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 4 Mar 2022 16:51:39 +0100 Subject: build(docker): allow specific config for staging service --- docker-compose.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'docker-compose.yml') diff --git a/docker-compose.yml b/docker-compose.yml index c8d675b..8d0ad57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,21 +5,27 @@ services: context: . dockerfile: Dockerfile args: - DOCKER_PORT: ${APP_DOCKER_PORT_PROD:-3000} + APP_ENV: production + DOCKER_PORT: ${APP_DOCKER_PORT:-3000} container_name: apcom env_file: - .env + environment: + APP_ENV: production ports: - - '${APP_DOCKER_PORT_PROD:-3000}:${APP_DOCKER_PORT_PROD:-3000}' + - '${APP_DOCKER_PORT:-3000}:${APP_DOCKER_PORT:-3000}' restart: always - apcom-dev: + apcom-staging: build: context: . dockerfile: Dockerfile args: - DOCKER_PORT: ${APP_DOCKER_PORT_DEV:-3200} - container_name: apcom-dev + APP_ENV: staging + DOCKER_PORT: ${APP_STAGING_DOCKER_PORT:-3200} + container_name: apcom-staging env_file: - .env + environment: + APP_ENV: staging ports: - - '${APP_DOCKER_PORT_DEV:-3200}:${APP_DOCKER_PORT_DEV:-3200}' + - '${APP_STAGING_DOCKER_PORT:-3200}:${APP_STAGING_DOCKER_PORT:-3200}' -- cgit v1.2.3