-
Notifications
You must be signed in to change notification settings - Fork 4
/
dobi.yaml
168 lines (138 loc) · 3.44 KB
/
dobi.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
meta:
project: osmcarto
# JOBS
job=shapefiles:
use: i-shapefiles
mounts: [m-root]
interactive: true
annotations:
description: 'Downloads and builds world boundaries and other global shapefiles'
job=fonts:
use: i-fonts
mounts: [m-fonts]
interactive: true
annotations:
description: 'Downloads fonts used by osm-carto'
job=import:
use: i-import
mounts: [m-root]
interactive: true
net-mode: '{project}_default'
depends: [c-db]
env:
- PGHOST=db
- PGUSER=postgres
- PG_WORK_MEM
- PG_MAINTENANCE_WORK_MEM
- OSM2PGSQL_CACHE
- OSM2PGSQL_NUMPROC
- OSM2PGSQL_DATAFILE=data.osm.pbf
annotations:
description: 'Imports OSM data into the database'
job=compile:
use: i-carto
mounts: [m-root]
interactive: true
annotations:
description: 'Compiles project.mml into style.xml used by mapnik/renderd'
# ALIASES
alias=init:
tasks: ['build', 'shapefiles', 'fonts', 'import']
annotations:
description: 'Builds, fetches and initializes resources'
alias=build:
tasks: ['i-carto', 'i-fonts', 'i-import', 'i-shapefiles', 'i-db', 'i-kosmtik', 'i-tiles']
annotations:
description: 'Builds all docker images'
alias=start:
tasks: ['kosmtik-start', 'tiles-start']
annotations:
description: 'Runs Kosmtik and tiles server'
alias=stop:
tasks: ['c-kosmtik:down', 'c-tiles:down', 'c-db:down']
annotations:
description: 'Stops tiles server'
alias=kosmtik-start:
tasks: ['c-kosmtik:detach']
annotations:
description: 'Runs Kosmtik'
alias=kosmtik-stop:
tasks: ['c-kosmtik:down', 'c-db:down']
annotations:
description: 'Stops Kosmtik'
alias=tiles-start:
tasks: ['c-tiles:detach']
annotations:
description: 'Runs tiles server'
alias=tiles-stop:
tasks: ['c-tiles:down', 'c-db:down']
annotations:
description: 'Stops tiles server'
# SERVICES
compose=c-db:
files: [docker-compose.db.yml]
project: '{project}'
compose=c-kosmtik:
files: [docker-compose.kosmtik.yml]
project: '{project}'
depends: ['c-db:detach']
compose=c-tiles:
files: [docker-compose.tiles.yml]
project: '{project}'
depends: ['c-db:detach']
# MOUNTS
mount=m-root:
bind: ../
path: /openstreetmap-carto
mount=m-fonts:
name: '{project}_fonts'
path: /usr/share/fonts
# IMAGES
image=i-base:
image: base
tags: ['osmcarto']
context: images/base
image=i-carto:
image: base_carto
tags: ['osmcarto']
context: images/base_carto
args:
APP_UID: '{user.uid}'
depends: [i-base]
image=i-fonts:
image: base_fonts
tags: ['osmcarto']
context: images/base_fonts
depends: [i-base]
image=i-import:
image: base_import
tags: ['osmcarto']
context: images/base_import
args:
APP_UID: '{user.uid}'
depends: [i-base]
image=i-shapefiles:
image: base_shapefiles
tags: ['osmcarto']
context: images/base_shapefiles
args:
APP_UID: '{user.uid}'
depends: [i-base]
image=i-db:
image: db
tags: ['osmcarto']
context: images/db
image=i-kosmtik:
image: base_kosmtik
tags: ['osmcarto']
context: images/base_kosmtik
args:
APP_UID: '{user.uid}'
depends: [i-base]
image=i-tiles:
image: base_tiles
tags: ['osmcarto']
context: images/base_tiles
args:
APP_UID: '{user.uid}'
depends: [i-base]