From 5723c342ad39efa4eace997b0377b93c05a51773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Eppl=C3=A9e?= Date: Tue, 7 Nov 2023 16:47:58 +0100 Subject: [PATCH] Make backend and frontend containers optional in docker compose --- docker/.env.example | 5 +++++ docker/docker-compose.yml | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/docker/.env.example b/docker/.env.example index 51c852c66..63d7abc81 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,4 +1,9 @@ COMPOSE_PROJECT_NAME=demo +# If you're running the backend and frontend +# outside of containers, +# remove this line to disable their containers +COMPOSE_PROFILES=backend,frontend + # Which user and group to use for running processes # inside containers. # Set this to the user and group you're using diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 0ff64f2d3..56c8f5593 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -249,6 +249,8 @@ services: - ray networks: - dwts_demo_network + profiles: + - backend dwts-frontend: image: uhhlt/dwts_frontend:${DWTS_FRONTEND_DOCKER_VERSION:-latest} @@ -260,6 +262,8 @@ services: - "${FRONTEND_EXPOSED:-3000}:3000" networks: - dwts_demo_network + profiles: + - frontend volumes: rabbitmq_data_demo: