Skip to content

Commit 89c254f

Browse files
feat: prod docker compose
1 parent 9fc9c53 commit 89c254f

4 files changed

+34
-2
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DB_HOST='localhost'

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Development
44

55
```sh
6-
docker compose up
6+
docker compose -f docker-compose.dev.yml up
77
pnpm install
88
pnpm start:dev
99
```

docker-compose.yml docker-compose.dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: aec-2024-skill08-s3
1+
name: aec-2024-skill08-s3-dev
22

33
services:
44
postgres:

docker-compose.prod.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: aec-2024-skill08-s3-prod
2+
3+
services:
4+
postgres:
5+
image: postgres:latest
6+
environment:
7+
POSTGRES_USER: postgres
8+
POSTGRES_PASSWORD: postgres
9+
POSTGRES_DB: postgres
10+
healthcheck:
11+
test: ['CMD-SHELL', 'pg_isready -U postgres']
12+
interval: 5s
13+
timeout: 5s
14+
retries: 5
15+
ports:
16+
- 5432:5432
17+
volumes:
18+
- pg_data:/var/lib/postgresql/data
19+
20+
api:
21+
image: ghcr.io/blz-it/aec-2024-skill08-s3-api:main
22+
environment:
23+
DB_HOST: postgres
24+
ports:
25+
- 3000:3000
26+
depends_on:
27+
postgres:
28+
condition: service_healthy
29+
30+
volumes:
31+
pg_data:

0 commit comments

Comments
 (0)