-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml.example
83 lines (78 loc) · 2.43 KB
/
docker-compose.yml.example
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
# vim: set syntax=yaml:
version: "3.6"
services:
'catalogueapi':
image: "opertusmundi/catalogueapi:${VERSION}"
build:
context: .
#dockerfile: development.dockerfile
args:
VERSION: ${VERSION}
volumes:
- type: 'bind'
source: ./logs
target: /var/local/catalogueapi/logs
#- type: 'bind'
# source: ./logging-syslog.conf
# target: /var/local/catalogueapi/logging.conf
# read_only: true
- type: 'bind'
source: ./data/secret_key
target: /var/local/catalogueapi/secret_key
read_only: true
- type: 'bind'
source: ./secrets/database-password
target: /secrets/database-password
read_only: true
environment:
SERVER_NAME: ${SERVER_NAME}
DATABASE_URL: ${DATABASE_URL}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD_FILE: /secrets/database-password
SQLALCHEMY_TRACK_MODIFICATIONS: "False"
DATABASE_INITIALIZE_SCHEMA: "False"
ERROR_404_HELP: "False"
RESTX_MASK_SWAGGER: "False"
RESTX_VALIDATE: "True"
SWAGGER_UI_DOC_EXPANSION: list
FLASK_ENV: ${FLASK_ENV}
FLASK_DEBUG: ${FLASK_DEBUG}
#LOGGING_FILE_CONFIG: 'logging.conf'
#LOGGING_ROOT_LEVEL: ""
#RSYSLOG_HOST: rsyslog-1
TZ: Europe/Athens
networks:
- opertusmundi_network
ports:
- 5000:5000
# This is not a service, but an one-off command. Run like:
# docker-compose run --rm flyway migrate
'flyway':
image: 'flyway/flyway:7.7'
command: ['info']
volumes:
- type: 'bind'
# A file (readable by gid 101) containing the sensitive part of Flyway configuration, e.g.:
# flyway.password=s3cret
# Generate with:
# cat secrets/database-password | xargs printf "flyway.password=%s" >secrets/flyway-secret.conf
source: ./secrets/flyway-secret.conf
target: /flyway/conf/secret.conf
read_only: true
- type: 'bind'
source: ./catalogueapi/resources/db/migration/
target: /flyway/sql
read_only: true
environment:
FLYWAY_CONFIG_FILES: /flyway/conf/secret.conf
FLYWAY_URL: ${FLYWAY_URL}
FLYWAY_USER: ${DATABASE_USERNAME}
FLYWAY_SCHEMAS: public
FLYWAY_DEFAULT_SCHEMA: public
FLYWAY_BASELINE_VERSION: ${FLYWAY_BASELINE_VERSION}
FLYWAY_TABLE: ${FLYWAY_TABLE}
FLYWAY_BASELINE_ON_MIGRATE: 'true'
networks:
- opertusmundi_network
networks:
opertusmundi_network: {external: true}