-
-
Notifications
You must be signed in to change notification settings - Fork 157
/
compose.yaml
129 lines (123 loc) · 3.21 KB
/
compose.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
services:
db:
profiles:
- offline
- dev
- test
image: postgres:11
restart: unless-stopped
ports:
- 5432:5432
environment:
- POSTGRES_USER=${DB_USERNAME-postgres}
- POSTGRES_PASSWORD=${DB_USER_PASSWORD-postgres}
volumes:
- ./postgresql/:/docker-entrypoint-initdb.d/
- postgres_data:/var/lib/postgresql/data
web:
profiles:
- dev
image: terrastories/devcore:latest
env_file:
- .env
command: scripts/server
restart: unless-stopped
stdin_open: true
tty: true
depends_on:
- db
ports:
- 80:3000 # Intended for use with HOST_HOSTNAME set
- 3000:3000 # Standard Rails development
- 3035:3035 # For Shakapacker/Webpack development server
expose:
- "80"
- "3000"
- "3035"
environment:
- CHECK_BUNDLER=yes
- RAILS_ENV=${RAILS_ENV-development}
volumes:
- bundler:/usr/local/bundle
- ./rails:/api
- ./data/media:/media
- ./data/import/media:/api/import/media
test:
profiles: [test]
image: terrastories/devcore:latest
entrypoint: ["bundle", "exec", "rspec"]
restart: no
stdin_open: true
tty: true
depends_on:
- db
environment:
- RAILS_ENV=test
volumes:
- bundler:/usr/local/bundle
- ./rails:/api
- ./data/media:/media
- ./data/import/media:/api/import/media
nginx-proxy:
profiles:
- offline
image: nginxproxy/nginx-proxy:latest
restart: unless-stopped
ports:
- 80:80
depends_on:
- localweb
- db
- tileserver
environment:
- DEFAULT_HOST=terrastories.local
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./nginx/error_pages:/usr/share/nginx/html:ro
- ./nginx/vhost.d:/etc/nginx/vhost.d:ro
- ./nginx/unrestricted_file_size.conf:/etc/nginx/conf.d/unrestricted_file_size.conf:ro
localweb:
profiles:
- offline
image: terrastories/terrastories:latest
env_file:
- .env
depends_on:
- db
ports:
- 3030:3030
expose:
- "3030"
volumes:
- ./data/media:/media
- ./data/import/media:/api/import/media
environment:
- RAILS_ENV=offline
- PORT=3030
- VIRTUAL_PORT=3030
- VIRTUAL_HOST=terrastories.local,${HOST_HOSTNAME-terrastories.local}
- VIRTUAL_PATH=/
- USE_LOCAL_MAP_SERVER=true
- OFFLINE_MAP_STYLE=http://terrastories.local/tileserver/styles/terrastories-map/style.json
# DATABASE_URL is configured the same as config/database.yaml for backwards compatibility
# with existing servers that used to run using "development" mode, or offline with a full
# dev built image.
- DATABASE_URL=${DATABASE_URL-postgresql://postgres:postgres@db:5432/terrastories-dev}
tileserver:
profiles:
- offline
restart: unless-stopped
image: maptiler/tileserver-gl:v4.6.5
command: --public_url http://terrastories.local/tileserver/
env_file:
- .env
volumes:
- ./tileserver/data:/data
environment:
- VIRTUAL_HOST=terrastories.local
- VIRTUAL_PATH=/tileserver/
- VIRTUAL_DEST=/
- VIRTUAL_PORT=8080
volumes:
postgres_data:
bundler: