forked from corona-warn-app/cwa-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (109 loc) · 3.78 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
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
version: '3'
services:
submission:
build:
context: ./
dockerfile: ./services/submission/Dockerfile
depends_on:
- postgres
- verification-fake
ports:
- "8000:8080"
- "8006:8081"
environment:
SPRING_PROFILES_ACTIVE: dev,disable-ssl-server,disable-ssl-client-postgres,disable-ssl-client-verification,disable-ssl-client-verification-verify-hostname
POSTGRESQL_SERVICE_PORT: '5432'
POSTGRESQL_SERVICE_HOST: postgres
POSTGRESQL_DATABASE: ${POSTGRES_DB}
POSTGRESQL_PASSWORD_SUBMISION: ${POSTGRES_SUBMISSION_PASSWORD}
POSTGRESQL_USER_SUBMISION: ${POSTGRES_SUBMISSION_USER}
POSTGRESQL_PASSWORD_FLYWAY: ${POSTGRES_FLYWAY_PASSWORD}
POSTGRESQL_USER_FLYWAY: ${POSTGRES_FLYWAY_USER}
VERIFICATION_BASE_URL: http://verification-fake:8004
distribution:
build:
context: ./
dockerfile: ./services/distribution/Dockerfile
depends_on:
- postgres
- objectstore
- create-bucket
environment:
SPRING_PROFILES_ACTIVE: dev,signature-dev,testdata,disable-ssl-client-postgres
POSTGRESQL_SERVICE_PORT: '5432'
POSTGRESQL_SERVICE_HOST: postgres
POSTGRESQL_DATABASE: ${POSTGRES_DB}
POSTGRESQL_PASSWORD_DISTRIBUTION: ${POSTGRES_DISTRIBUTION_PASSWORD}
POSTGRESQL_USER_DISTRIBUTION: ${POSTGRES_DISTRIBUTION_USER}
POSTGRESQL_PASSWORD_FLYWAY: ${POSTGRES_FLYWAY_PASSWORD}
POSTGRESQL_USER_FLYWAY: ${POSTGRES_FLYWAY_USER}
# Settings for the S3 compatible objectstore
CWA_OBJECTSTORE_ACCESSKEY: ${OBJECTSTORE_ACCESSKEY}
CWA_OBJECTSTORE_SECRETKEY: ${OBJECTSTORE_SECRETKEY}
CWA_OBJECTSTORE_ENDPOINT: http://objectstore
CWA_OBJECTSTORE_BUCKET: cwa
CWA_OBJECTSTORE_PORT: 8000
services.distribution.paths.output: /tmp/distribution
# Settings for cryptographic artifacts
VAULT_FILESIGNING_SECRET: ${SECRET_PRIVATE}
volumes:
- ./docker-compose-test-secrets:/secrets
postgres:
image: postgres:11.8
restart: always
ports:
- "8001:5432"
environment:
PGDATA: /data/postgres
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_volume:/data/postgres
- ./setup/setup-roles.sql:/docker-entrypoint-initdb.d/1-roles.sql
- ./local-setup/create-users.sql:/docker-entrypoint-initdb.d/2-users.sql
- ./local-setup/enable-test-data-docker-compose.sql:/docker-entrypoint-initdb.d/3-enable-testdata.sql
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
volumes:
- pgadmin_volume:/root/.pgadmin
ports:
- "8002:80"
restart: unless-stopped
depends_on:
- postgres
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
objectstore:
image: "zenko/cloudserver"
volumes:
- objectstore_volume:/data
ports:
- "8003:8000"
environment:
ENDPOINT: objectstore
REMOTE_MANAGEMENT_DISABLE: 1
SCALITY_ACCESS_KEY_ID: ${OBJECTSTORE_ACCESSKEY}
SCALITY_SECRET_ACCESS_KEY: ${OBJECTSTORE_SECRETKEY}
create-bucket:
image: amazon/aws-cli
environment:
- AWS_ACCESS_KEY_ID=${OBJECTSTORE_ACCESSKEY}
- AWS_SECRET_ACCESS_KEY=${OBJECTSTORE_SECRETKEY}
entrypoint: ["/root/scripts/wait-for-it/wait-for-it.sh", "objectstore:8000", "-t", "30", "--"]
volumes:
- ./scripts/wait-for-it:/root/scripts/wait-for-it
command: aws s3api create-bucket --bucket cwa --endpoint-url http://objectstore:8000 --acl public-read
depends_on:
- objectstore
verification-fake:
image: lilienthal/cwa-verification-fake:0.0.3
restart: always
ports:
- "8004:8004"
volumes:
postgres_volume:
pgadmin_volume:
objectstore_volume: