-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
51 lines (47 loc) · 969 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: '3.7'
services:
db:
image: postgres:14-alpine
container_name: goreads
restart: always
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 3s
timeout: 1s
retries: 20
environment:
POSTGRES_DB: goreads
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
networks:
- goreads_net
api:
build: ./backend
container_name: goreads_api
depends_on:
db:
condition: service_healthy
ports:
- 3333:3333
environment:
DATABASE_URL: postgresql://postgres:1234@db:5432/goreads?schema=public
JWT_SECRET: jwt_secret
networks:
- goreads_net
web:
build: ./frontend
container_name: goreads_web
depends_on:
- api
- db
ports:
- 3000:3000
volumes:
- ./frontend:/goreads
networks:
- goreads_net
networks:
goreads_net:
driver: bridge