-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
44 lines (40 loc) · 934 Bytes
/
compose.yaml
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
# reference for docker services
# https://docs.docker.com/reference/compose-file/services/
services:
frontend:
container_name: frontend
image: frontend
build:
context: ./frontend
dockerfile: frontend.dockerfile
ports:
- 3000:3000
environment:
- NEXT_PUBLIC_API_URL=http://localhost:4000
restart: always
depends_on:
- backend
backend:
container_name: backend
image: backend
build:
context: ./backend
dockerfile: backend.dockerfile
ports:
- 4000:4000
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/postgres?schema=public
db:
container_name: db
image: postgres:12
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata: {}