-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yaml
132 lines (122 loc) · 3.26 KB
/
docker-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
130
131
132
services:
db:
image: camptocamp/postgres:17-postgis-3
environment:
POSTGRES_USER: postgresql
POSTGRES_PASSWORD: postgresql
POSTGRES_DB: tests
volumes:
- ./docker/test-db:/docker-entrypoint-initdb.d:ro
mapserver:
image: camptocamp/mapserver:8.0
environment:
MS_DEBUGLEVEL: '5'
MAPSERVER_CATCH_SEGV: '1'
MS_MAPFILE: /etc/mapserver/mapserver.map
volumes:
- ./docker/mapfile-docker:/etc/mapserver:ro
links:
- db:db
user: www-data
redis_master:
image: bitnami/redis:7.4.1
environment:
- REDIS_REPLICATION_MODE=master
- ALLOW_EMPTY_PASSWORD=yes
redis_slave:
image: bitnami/redis:7.4.1
environment:
- REDIS_REPLICATION_MODE=slave
- REDIS_MASTER_HOST=redis_master
- ALLOW_EMPTY_PASSWORD=yes
depends_on:
- redis_master
redis_sentinel:
image: bitnami/redis-sentinel:7.4.1
environment:
- REDIS_MASTER_HOST=redis_master
- REDIS_MASTER_SET=mymaster
- ALLOW_EMPTY_PASSWORD=yes
depends_on:
- redis_master
- redis_slave
application: &app
image: camptocamp/tilecloud-chain
environment: &app-env
TILECLOUD_LOG_LEVEL: INFO
TILECLOUD_CHAIN_LOG_LEVEL: INFO
TILECLOUD_CHAIN_SESSION_SECRET: '1234'
TILECLOUD_CHAIN_SESSION_SALT: '1234'
C2C_AUTH_GITHUB_REPOSITORY: camptocamp/tilecloud-chain
C2C_AUTH_GITHUB_SECRET: '1234567890123456789'
C2C_AUTH_GITHUB_CLIENT_ID: '1234'
C2C_AUTH_GITHUB_CLIENT_SECRET: '1234'
C2C_PROMETHEUS_PORT: '9110'
links:
- db
- mapserver
- redis_sentinel
volumes:
- ./example/tilegeneration/config.yaml:/etc/tilegeneration/config.yaml:ro
app_test_user:
<<: *app
environment:
<<: *app-env
TEST_USER: Test
app_postgresql:
<<: *app
environment:
<<: *app-env
TEST_USER: Test
SQL_LOG_LEVEL: DEBUG
TILECLOUD_CHAIN_SQLALCHEMY_URL: postgresql+psycopg2://postgresql:postgresql@db:5432/tests
volumes:
- ./example/tilegeneration/config-postgresql.yaml:/etc/tilegeneration/config.yaml:ro
ports:
- '9052:8080'
slave:
<<: *app
command:
- /venv/bin/generate-tiles
- '--role=slave'
- '--daemon'
environment:
<<: *app-env
TILECLOUD_CHAIN_SLAVE: 'TRUE'
test:
image: camptocamp/tilecloud-chain-tests
working_dir: /app
environment:
CI: 'true'
TESTS: 'true'
PGPASSWORD: postgresql
TILE_NB_THREAD: 2
METATILE_NB_THREAD: 2
SERVER_NB_THREAD: 2
TILECLOUD_LOG_LEVEL: DEBUG
TILECLOUD_CHAIN_LOG_LEVEL: DEBUG
TILECLOUD_CHAIN_SESSION_SALT: a-long-secret-a-long-secret
TILECLOUD_CHAIN_SQLALCHEMY_URL: postgresql+psycopg2://postgresql:postgresql@db:5432/tests
command:
- sleep
- infinity
links:
- db
- mapserver
- redis_sentinel
volumes:
- ./results:/results
- ./tilecloud_chain:/app/tilecloud_chain
# - ../tilecloud/tilecloud:/usr/local/lib/python3.8/dist-packages/tilecloud
shell:
image: camptocamp/postgres:17-postgis-3
command:
- tail
- -f
- /dev/null
environment:
- PGHOST=db
- PGUSER=postgresql
- PGPASSWORD=postgresql
- PGDATABASE=tests
- PGPORT=5432