-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
75 lines (73 loc) · 1.67 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3.8'
services:
db:
image: postgres:14-alpine
container_name: ${PROJECT}_db
volumes:
- ./.pgdata:/var/lib/postgresql/data
ports:
- '5432:5432'
environment:
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DATABASE}
restart: always
networks:
- local
common:
image: ${PROJECT}_base
container_name: ${PROJECT}_common
build:
context: ./
dockerfile: Dockerfile
command: 'yarn watch:common'
volumes:
- ./node_modules:/node_modules
- ./packages:/packages
api:
image: ${PROJECT}_base
container_name: ${PROJECT}_api
build:
context: ./
dockerfile: Dockerfile
command: 'yarn watch:api'
volumes:
- ./node_modules:/node_modules
- ./apps/api:/apps/api
- ./packages:/packages
ports:
- '4000:4000'
env_file:
- ./.env
environment:
- POSTGRES_HOST=db
- BUILD_ID=${COMMIT_SHA}
- BUILD_INFO=${LAST_COMMIT_MESSAGE}
depends_on:
- db
- common
networks:
- local
web:
image: ${PROJECT}_base
container_name: ${PROJECT}_web
build:
context: ./
dockerfile: Dockerfile
command: 'yarn watch:web'
volumes:
- ./node_modules:/node_modules
- ./apps/web:/apps/web
- ./packages:/packages
ports:
- '3000:3000'
environment:
- NEXT_PUBLIC_API_URL=http://localhost:4000/api/v1
- RUNTIME_ENV=local
- NEXT_PUBLIC_AUTH_REALM=${NEXT_PUBLIC_AUTH_REALM}
- NEXT_PUBLIC_AUTH_URL=${NEXT_PUBLIC_AUTH_URL}
depends_on:
- api
networks:
local:
driver: bridge