-
Notifications
You must be signed in to change notification settings - Fork 1
/
compose.yml
70 lines (70 loc) · 1.69 KB
/
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
services:
main:
depends_on:
- db
- object-storage
build: ./services/main
volumes:
- uploads:/opt/tk/uploads/
secrets:
- db
- key
- blob
environment:
DB_HOST: "${DB_HOST-db}"
DB_PORT: "${DB_PORT-5432}"
S3_ENDPOINT: "${S3_ENDPOINT:-object-storage:9000}"
S3_REGION: "${S3_REGION-docker}"
S3_BUCKET: "${S3_BUCKET-storage}"
S3_USER: "${S3_USER-testuser}"
S3_SECRET: "${S3_SECRET-testsecret}"
db:
build: ./services/db
restart: unless-stopped
environment:
- POSTGRES_INITDB_ARGS='-E UTF8'
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=sql
volumes:
- database:/var/lib/postgresql/data
ports:
- "5432"
object-storage:
image: bitnami/minio:latest
ports:
- "9000:9000"
- "9001:9001"
environment:
- MINIO_ROOT_USER=${S3_USER-testuser}
- MINIO_ROOT_PASSWORD=${S3_SECRET-testsecret}
- MINIO_DEFAULT_BUCKETS=${S3_BUCKET-storage}
volumes:
- objects:/data
nginx:
build: ./services/nginx
environment:
- DOCKER_SERVER_NAME=localhost
- USE_SSL=${USE_SSL}
ports:
- "80:80"
- "443:443"
secrets:
- ssl_certificate
- ssl_certificate_key
## By default this config uses default local driver,
## For custom volumes replace with volume driver configuration.
volumes:
uploads:
database:
objects:
secrets:
db:
file: ./secrets/default_secrets/db.json
key:
file: ./secrets/default_secrets/aes.key
blob:
file: ./secrets/default_secrets/blob.json
ssl_certificate:
file: ./secrets/default_secrets/ssl/ssl.crt
ssl_certificate_key:
file: ./secrets/default_secrets/ssl/ssl_crt.key