-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
85 lines (85 loc) · 2.75 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
services:
api-rest-v0:
depends_on: [db]
environment:
PGRST_DB_ANON_ROLE: anonymous
PGRST_DB_SCHEMA: api_v0
PGRST_DB_URI: postgres://pgrst:anonymous@db:5432/allmanak
PGRST_MAX_ROWS: 100000
PGRST_SERVER_PROXY_URI: https://rest-api.allmanak.nl/v0/
image: postgrest/postgrest:v5.2.0
restart: always
api-rest-v1:
depends_on: [db]
environment:
PGRST_DB_ANON_ROLE: anonymous
PGRST_DB_SCHEMA: api_v1
PGRST_DB_URI: postgres://pgrst:anonymous@db:5432/allmanak
PGRST_MAX_ROWS: 100000
PGRST_SERVER_PROXY_URI: https://rest-api.allmanak.nl/v1/
# Use custom build image instead, see README Custom PostgREST in v1
image: postgrest/postgrest:v6.0.2
#force-check image: postgrest/postgrest:v6.0.0 #check-outdated
restart: always
app:
command: sh -c "yarn && yarn build && node __sapper__/build"
depends_on: [api-rest-v1]
expose: ['3000']
image: node:12.22.0-alpine #check-outdated: alpine
restart: always
volumes:
- './app:/app'
- 'app-sapper:/app/__sapper__/'
- 'node-modules:/app/node_modules/'
- 'yarn-cache:/usr/local/share/.cache/yarn/'
working_dir: /app
build-static:
command: sh -c '/sbin/inotifyd - /web/build_static:e | xargs -I% yarn export+process'
depends_on: [api-rest-v1, web]
image: node:12.22.0-alpine #check-outdated: alpine
restart: always
volumes:
- './app:/app'
- './nginx/shared:/etc/nginx/shared'
- './staticapp:/web'
- 'build-static-sapper:/app/__sapper__/'
- 'node-modules:/app/node_modules/'
- 'yarn-cache:/usr/local/share/.cache/yarn/'
working_dir: /app
db:
environment:
POSTGRES_DB: allmanak
POSTGRES_INITDB_ARGS: --data-checksums
image: postgres:11.4-alpine #check-outdated: alpine
restart: always
volumes:
- './database/initdb:/docker-entrypoint-initdb.d:ro'
- './database/shared:/shared:ro'
- './database/upgrade:/upgrade:ro'
- './pgdata:/var/lib/postgresql/data'
import-cron:
build: ./import-cron
depends_on: [db]
restart: always
volumes:
- './nginx/shared:/etc/nginx/shared'
- './staticapp:/web'
- './app:/app'
- './import-cron:/work'
web:
command: sh -c 'nginx -g "daemon off;" & (/sbin/inotifyd - /web/nginx_reload:e | xargs -I% nginx -s reload)'
depends_on: [app, api-rest-v1]
image: nginx:1.17.2-alpine #check-outdated: alpine
restart: always
volumes:
- './app/static:/app/static:ro'
- './image:/image:ro'
- './nginx/default.conf:/etc/nginx/conf.d/default.conf:ro'
- './nginx/shared:/etc/nginx/shared:ro'
- './staticapp:/web'
version: '3.1'
volumes:
app-sapper: null
build-static-sapper: null
node-modules: null
yarn-cache: null