forked from swisstopo/swissgeol-viewer-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
89 lines (84 loc) · 2.32 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
services:
api:
init: true # handle kill signals for rust
image: ghcr.io/swisstopo/swissgeol-viewer-app-local_api:latest
platform: linux/amd64
ports:
- 8480:3000
environment:
# S3
S3_AWS_REGION: &minio_region eu-west-1
AWS_ACCESS_KEY_ID: &minio_user minio
AWS_SECRET_ACCESS_KEY: &minio_pass minio123
S3_BUCKET: ngmpub-userdata-local
PROJECTS_S3_BUCKET: ngmpub-project-files-local
S3_ENDPOINT: http://minio:9000
# Cognito
COGNITO_CLIENT_ID: 10h1tga4i933buv25lelalmtrn
COGNITO_POOL_ID: eu-west-1_dbfEb2FuH
# Postgres
PGUSER: &db_user www-data
PGPASSWORD: &db_pass www-data
PGDATABASE: &db_name swissgeol-local
PGHOST: db
PGPORT: "5432"
# Api
APP_PORT: "3000"
SQLX_OFFLINE: "true"
DATABASE_URL: "postgres://www-data:www-data@db:5432/swissgeol-local"
command: ["cargo", "watch", "--poll", "--shell", "cargo run --offline --target x86_64-unknown-linux-musl"]
volumes:
- ./api/src:/app/src:ro
- ./api/migrations:/app/migrations:ro
- ./api/.sqlx:/app/.sqlx:ro
- ./api/Cargo.toml:/app/Cargo.toml:ro
links:
- db
ui:
image: node:lts
ports:
- 8000:8000
environment:
ENVIRONMENT_NAME: local-dev
working_dir: /app
command: ['node_modules/.bin/webpack', 'serve']
links:
- api
- abbreviator
volumes:
- "./ui:/app:ro"
minio:
init: true # handle kill signals
image: minio/minio:latest
command: server /data --console-address :9001
volumes:
- miniodata:/data
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_BROWSER: 'on'
MINIO_SITE_REGION: *minio_region
MINIO_ROOT_USER: *minio_user
MINIO_ROOT_PASSWORD: *minio_pass
abbreviator:
image: ghcr.io/swisstopo/swissgeol-viewer-app-abbreviator:main
platform: linux/amd64
ports:
- "8001:8080"
environment:
ID_LENGTH: 5
DATABASE_URL: "sqlite:///storage/local.db"
HOST_WHITELIST: "localhost"
db:
image: camptocamp/postgres:14-postgis-3
platform: linux/amd64
environment:
POSTGRES_USER: *db_user
POSTGRES_PASSWORD: *db_pass
POSTGRES_DB: *db_name
ports:
- 15432:5432
# command: postgres -c log_statement=all for debugging
volumes:
miniodata: