forked from monoid-privacy/monoid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
177 lines (177 loc) · 4.67 KB
/
docker-compose.dev.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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Do not use this configuration in prod, this is only for development
# use.
version: "3.7"
services:
db:
image: postgres:14.6-alpine3.16
container_name: monoid-dev-db
restart: unless-stopped
environment:
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_USER=${DATABASE_USER}
volumes:
- db:/var/lib/postgresql/data
- ./monoid-api/config-data/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- monoid-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 10
ports:
- 5434:5432
web:
container_name: monoid-dev-web
build:
dockerfile: Dockerfile.dev
context: ./monoid-ui
ports:
- 3000:3000
volumes:
- ./monoid-ui:/app
networks:
- monoid-network
temporal-ui:
container_name: temporal-dev-ui
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=monoid-dev-temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: temporalio/ui:${TEMPORAL_UI_VERSION}
networks:
- monoid-network
ports:
- 8082:8080
temporal:
container_name: monoid-dev-temporal
depends_on:
- db
environment:
- DB=postgresql
- DB_PORT=5432
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PWD=${DATABASE_PASSWORD}
- POSTGRES_SEEDS=monoid-dev-db
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
image: temporalio/auto-setup:1.18.4
networks:
- monoid-network
volumes:
- ./monoid-api/config-data/temporal:/etc/temporal/config/dynamicconfig
healthcheck:
test:
[
"CMD",
"tctl",
"--address",
"monoid-dev-temporal:7233",
"workflow",
"list"
]
interval: 1s
timeout: 5s
retries: 30
ports:
- 7233:7233
api:
build:
dockerfile: Dockerfile.dev
context: ./monoid-api
command: -c cmd/server/.air.toml
working_dir: /app
container_name: monoid-dev-api
volumes:
- ./monoid-api:/app
- ${LOCAL_FILESTORE_PATH}:${FILESTORE_PATH}
- ${LOCAL_TEMPSTORE_PATH}:/tmp/monoid
# Mount resources separately so new connectors can be tested easily.
# Don't do this in prod.
- ./monoid-api/config-data/resources:${RESOURCE_PATH}
environment:
- WEB_URL=${WEB_URL}
- DB_USER=${DATABASE_USER}
- DB_PASS=${DATABASE_PASSWORD}
- DB_TCP_HOST=monoid-dev-db
- TEMP_STORE_PATH=/tmp/monoid
- DB_PORT=5432
- DB_NAME=${DATABASE_NAME}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- RESOURCE_PATH=${RESOURCE_PATH}
- SEGMENT_KEY=${SEGMENT_KEY}
- FILESTORE_PATH=${FILESTORE_PATH}
- TEMPORAL=monoid-dev-temporal:7233
depends_on:
db:
condition: service_healthy
loader:
condition: service_completed_successfully
temporal:
condition: service_healthy
ports:
- 8080:8080
networks:
- monoid-network
loader:
container_name: monoid-dev-loader
build:
dockerfile: cmd/tools/loader/Dockerfile
context: ./monoid-api
command: /config-data
environment:
- DB_USER=${DATABASE_USER}
- DB_PASS=${DATABASE_PASSWORD}
- DB_TCP_HOST=monoid-dev-db
- DB_PORT=5432
- DB_NAME=${DATABASE_NAME}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- SEGMENT_KEY=${SEGMENT_KEY}
depends_on:
db:
condition: service_healthy
networks:
- monoid-network
volumes:
- ./monoid-api/config-data:/config-data
worker:
build:
dockerfile: Dockerfile.dev
context: ./monoid-api
command: -c cmd/worker/.air.toml
container_name: monoid-dev-worker
working_dir: /app
environment:
- WEB_URL=${WEB_URL}
- DB_USER=${DATABASE_USER}
- DB_PASS=${DATABASE_PASSWORD}
- DB_TCP_HOST=monoid-dev-db
- DB_PORT=5432
- DB_NAME=${DATABASE_NAME}
- DOCKER_HOST=unix:///var/run/docker.sock
- TEMP_STORE_PATH=/tmp/monoid
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
- SEGMENT_KEY=${SEGMENT_KEY}
- FILESTORE_PATH=${FILESTORE_PATH}
- TEMPORAL=monoid-dev-temporal:7233
depends_on:
db:
condition: service_healthy
loader:
condition: service_completed_successfully
temporal:
condition: service_healthy
networks:
- monoid-network
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${LOCAL_FILESTORE_PATH}:${FILESTORE_PATH}
- ${LOCAL_TEMPSTORE_PATH}:/tmp/monoid
- ./monoid-api:/app
networks:
monoid-network:
driver: bridge
name: monoid-dev-network
volumes:
db:
name: monoid-dev-db