forked from deptagency/algomart
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
132 lines (124 loc) · 2.95 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: '3'
services:
api-db:
image: postgres:14-alpine
restart: unless-stopped
environment:
POSTGRES_USER: api
POSTGRES_PASSWORD: api
POSTGRES_DB: api
networks:
- algomart_local
ports:
- "5434:5432"
volumes:
- api-db:/var/lib/postgresql/data
cms-db:
image: postgres:14-alpine
restart: unless-stopped
environment:
POSTGRES_USER: cms
POSTGRES_PASSWORD: cms
POSTGRES_DB: cms
networks:
- algomart_local
ports:
- "5435:5432"
volumes:
- cms-db:/var/lib/postgresql/data
cms:
build:
context: .
dockerfile: docker/local/cms/Dockerfile
restart: unless-stopped
depends_on:
- cms-db
env_file: apps/cms/.env
environment:
# only put values in here that should override the CMS .env file
DB_CONNECTION_STRING: postgres://cms:cms@cms-db:5432/cms
PORT: 8055
networks:
- algomart_local
ports:
- "8055:8055"
volumes:
- .:/app
- node-modules:/app/node_modules
api:
build:
context: .
dockerfile: docker/local/api/Dockerfile
restart: unless-stopped
depends_on:
- api-db
- cms
command: "bash ./docker/local/api/run.sh wait-for-cms"
env_file: apps/api/.env
environment:
# only put values in here that should override the API .env file
CMS_URL: http://cms:8055
DATABASE_URL: postgres://api:api@api-db:5432/api
HOST: 0.0.0.0
PORT: 3001
NODE_ENV: development
networks:
- algomart_local
ports:
- "3001:3001"
volumes:
- .:/app
- node-modules:/app/node_modules
scribe:
build:
context: .
dockerfile: docker/local/scribe/Dockerfile
restart: unless-stopped
depends_on:
- api-db
- cms
command: "bash ./docker/local/scribe/run.sh wait-for-cms"
env_file: apps/scribe/.env
environment:
# only put values in here that should override the API .env file
CMS_URL: http://cms:8055
CMS_PUBLIC_URL: http://localhost:8055
DATABASE_URL: postgres://api:api@api-db:5432/api
HOST: 0.0.0.0
PORT: 3002
networks:
- algomart_local
ports:
- "3002:3002"
volumes:
- .:/app
- node-modules:/app/node_modules
web:
build:
context: .
dockerfile: docker/local/web/Dockerfile
restart: unless-stopped
depends_on:
- api
- cms
command: "bash ./docker/local/web/run.sh wait-for-api"
env_file: apps/web/.env
environment:
# only put values in here that should override the Web .env file
API_URL: http://api:3001
IMAGE_DOMAINS: lh3.googleusercontent.com,firebasestorage.googleapis.com,localhost,cms
PORT: 3000
NODE_ENV: development
networks:
- algomart_local
ports:
- "3000:3000"
volumes:
- .:/app
- node-modules:/app/node_modules
networks:
algomart_local:
volumes:
api-db:
cms-db:
node-modules: