Skip to content

Commit

Permalink
chore: add prod like environment to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
pdmnyberg committed Oct 28, 2024
1 parent e7e98d0 commit 9e18857
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`.
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 9e18857

Please sign in to comment.