-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yaml
159 lines (157 loc) · 4.07 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
services:
db:
container_name: db
build:
args:
DB_JMDICT: https://github.com/scriptin/jmdict-simplified/releases/download/3.5.0%2B20240311121612/jmdict-eng-3.5.0+20240311121612.json.zip
context: .
dockerfile: ./services/db/Dockerfile
environment:
PGDATA: '/var/lib/postgresql/data/pgdata'
POSTGRES_DB: db
POSTGRES_INITDB_ARGS: '--encoding=UTF-8 --lc-collate=ja_JP.utf8 --lc-ctype=ja_JP.utf8'
POSTGRES_PASSWORD: ${DB_PG_PASSWORD}
healthcheck:
test: pg_isready -h db || exit 1
interval: 15s
timeout: 30s
retries: 999999
start_period: 10s
networks:
- backend
ports:
- '5432:5432'
restart: always
shm_size: 1gb
volumes:
- db:/var/lib/postgresql/data
graphql:
container_name: graphql
build:
context: .
dockerfile: ./services/graphql/Dockerfile
command: npm run dev
environment:
ALLOW_OTHER_DEVICES: ${ALLOW_OTHER_DEVICES}
GRAPHQL_PORT: ${GRAPHQL_PORT}
POSTGRES_PASSWORD: ${DB_PG_PASSWORD}
networks:
- backend
ports:
- '${GRAPHQL_PORT}:${GRAPHQL_PORT}'
restart: always
volumes:
- files:/dokugaku
- ./services/graphql/src:/app/services/graphql/src
ichiran:
container_name: ichiran
build:
context: .
dockerfile: ./services/ichiran/docker/ichiran/Dockerfile
command: >
sh -c "
sh init.sh &&
npm run dev
"
depends_on:
ichiran-db:
condition: service_healthy
restart: true
environment:
ICHIRAN_PORT: ${ICHIRAN_PORT}
POSTGRES_PASSWORD: ${ICHIRAN_PG_PASSWORD}
networks:
- backend
- ichiran
ports:
- '${ICHIRAN_PORT}:${ICHIRAN_PORT}'
restart: always
volumes:
- ./services/ichiran/src:/app/services/ichiran/src
ichiran-db:
container_name: ichiran-db
build:
args:
ICHIRAN_PGDUMP: https://github.com/tshatrov/ichiran/releases/download/ichiran-240107/jmdict-070124.pgdump
context: .
dockerfile: ./services/ichiran/docker/ichiran-db/Dockerfile
environment:
PGDATA: '/var/lib/postgresql/data/pgdata'
POSTGRES_PASSWORD: ${ICHIRAN_PG_PASSWORD}
healthcheck:
test: pg_isready -h ichiran-db || exit 1
interval: 30s
timeout: 30s
retries: 999999
start_period: 30s
networks:
- ichiran
restart: always
shm_size: 1gb
volumes:
- ichiran-db:/var/lib/postgresql/data
mokuro:
container_name: mokuro
build:
context: .
dockerfile: ./services/mokuro/Dockerfile
command: npm run dev
environment:
MOKURO_PORT: ${MOKURO_PORT}
networks:
- backend
ports:
- '${MOKURO_PORT}:${MOKURO_PORT}'
privileged: true
restart: always
volumes:
- files:/dokugaku
- ./services/mokuro/src:/app/services/mokuro/src
web:
container_name: web
build:
args:
NEXT_PUBLIC_ALLOW_OTHER_DEVICES: ${ALLOW_OTHER_DEVICES}
NEXT_PUBLIC_GRAPHQL_PORT: ${GRAPHQL_PORT}
NEXT_PUBLIC_HOST_IP: ${HOST_IP}
NEXT_PUBLIC_WORK_PROCESSOR_PORT: ${WORK_PROCESSOR_PORT}
WEB_PORT: ${WEB_PORT}
context: .
dockerfile: ./apps/web/Dockerfile.dev
networks:
- backend
ports:
- '${WEB_PORT}:${WEB_PORT}'
privileged: true
restart: always
volumes:
- files:/dokugaku
- ./apps/web/src:/app/apps/web/src
work-processor:
container_name: work-processor
build:
context: .
dockerfile: ./services/work-processor/Dockerfile
command: npm run dev
environment:
ALLOW_OTHER_DEVICES: ${ALLOW_OTHER_DEVICES}
ICHIRAN_PORT: ${ICHIRAN_PORT}
MOKURO_PORT: ${MOKURO_PORT}
POSTGRES_PASSWORD: ${DB_PG_PASSWORD}
WORK_PROCESSOR_PORT: ${WORK_PROCESSOR_PORT}
networks:
- backend
ports:
- '${WORK_PROCESSOR_PORT}:${WORK_PROCESSOR_PORT}'
privileged: true
restart: always
volumes:
- files:/dokugaku
- ./services/work-processor/src:/app/services/work-processor/src
networks:
backend:
ichiran:
volumes:
db:
files:
ichiran-db: