forked from go-spatial/tegola
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (40 loc) · 1.2 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
# this file is used to bootstrap services to run tegola tests against
version: "3"
services:
redis:
image: redis:6.2.6
container_name: redis
ports:
- 6379:6379
postgis:
image: postgis/postgis:12-3.0-alpine
container_name: postgis
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
migration:
image: postgis/postgis:12-3.0-alpine
container_name: migration
depends_on:
postgis:
condition: service_healthy
environment:
PGUSER: postgres
PGPASSWORD: postgres
command:
- /bin/bash
- -c
- |
wget "https://github.com/go-spatial/tegola-testdata/raw/master/tegola.dump"
psql -h postgis -p 5432 -U postgres -d postgres -c "DROP DATABASE IF EXISTS tegola;"
pg_restore -h postgis -p 5432 -U postgres -d postgres -C tegola.dump
psql -h postgis -U postgres -d postgres -c "DROP ROLE IF EXISTS tegola_no_access;CREATE ROLE tegola_no_access LOGIN PASSWORD 'postgres'"
rm tegola.dump