-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
73 lines (70 loc) · 2.25 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
services:
db:
image: postgis/postgis
container_name: db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER}" ]
interval: 5s
timeout: 5s
retries: 10
ports:
- ${DB_PORT}:5432
server:
init: true
build:
context: .
container_name: ogcapi
environment:
RUST_LOG: ${RUST_LOG}
APP_HOST: ${APP_HOST}
APP_PORT: ${APP_PORT}
DATABASE_URL: postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_REGION: ${AWS_REGION}
AWS_CUSTOM_ENDPOINT: http://minio:9000
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
volumes:
- ./ogcapi/src:/app/ogcapi/src:ro
- ./ogcapi/Cargo.toml:/app/ogcapi/Cargo.toml:ro
- ./ogcapi-client/src:/app/ogcapi-client/src:ro
- ./ogcapi-client/Cargo.toml:/app/ogcapi-client/Cargo.toml:ro
- ./ogcapi-drivers/src:/app/ogcapi-drivers/src:ro
- ./ogcapi-drivers/Cargo.toml:/app/ogcapi-drivers/Cargo.toml:ro
- ./ogcapi-drivers/migrations:/app/ogcapi-drivers/migrations:ro
- ./ogcapi-services/src:/app/ogcapi-services/src:ro
- ./ogcapi-services/Cargo.toml:/app/ogcapi-services/Cargo.toml:ro
- ./ogcapi-types:/app/ogcapi-types:ro
depends_on:
db:
condition: service_healthy
command: tail -f /dev/null
ports:
- ${APP_PORT}:${APP_PORT}
minio:
image: minio/minio
container_name: minio
volumes:
- ./data/minio:/data
command: server /data --console-address ":9001"
ports:
- 9000:9000
- 9001:9001
minio-mc:
image: minio/mc
container_name: minio-mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/${AWS_S3_BUCKET_NAME};
/usr/bin/mc anonymous set public myminio/${AWS_S3_BUCKET_NAME};
/usr/bin/mc admin user add myminio ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY};
/usr/bin/mc admin policy attach myminio readwrite --user ${AWS_ACCESS_KEY_ID};
exit 0;
"