From 9e18857d7ca02d69f46055bf066e450cf9c9e308 Mon Sep 17 00:00:00 2001 From: Mattias Nyberg Date: Mon, 28 Oct 2024 14:22:20 +0100 Subject: [PATCH] chore: add prod like environment to docker compose --- README.md | 3 ++- docker-compose.yml | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a7dc838..9203f79 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ directory as `/app` within the containter: ```shell $ docker compose build -$ docker compose up -d +$ docker compose --profile dev up -d +$ docker compose --profile prod up -d ``` The running service will be avaliable at `http://localhost:5000/`. diff --git a/docker-compose.yml b/docker-compose.yml index 456c6dd..b18b059 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,5 +6,15 @@ services: stop_signal: SIGINT ports: - 127.0.0.1:${APP_PORT:-5000}:${APP_PORT:-5000} + profiles: ["dev"] volumes: - ./:/app + + web-prod: + build: + context: . + target: prod + stop_signal: SIGINT + profiles: ["prod"] + ports: + - 127.0.0.1:${APP_PORT:-5000}:${APP_PORT:-5000}