forked from informatici/openhospital-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (60 loc) · 1.79 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
version: '3'
services:
database:
build:
context: ./deps/openhospital-core
dockerfile: Dockerfile-ohdb
image: oh-core_database:latest
ports:
- "3306:3306"
command: mysqld --sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" --lower_case_table_names=1
environment:
MARIADB_MYSQL_LOCALHOST_USER: "true"
MARIADB_DATABASE: oh
MARIADB_ROOT_PASSWORD: ${OH_MARIADB_ROOT_PASSWORD}
MARIADB_USER: ${OH_MARIADB_USER}
MARIADB_PASSWORD: ${OH_MARIADB_PASSWORD}
networks:
- hospital-net
restart: unless-stopped
oh-database-init:
image: oh-core_database:latest
command: sh -c "mysql -v --host database -u ${OH_MARIADB_USER} -p${OH_MARIADB_PASSWORD} oh < /database-sources/create_all_demo.sql"
depends_on:
- database
working_dir: /database-sources
environment:
MARIADB_MYSQL_LOCALHOST_USER: "true"
MARIADB_DATABASE: oh
MARIADB_ROOT_PASSWORD: ${OH_MARIADB_ROOT_PASSWORD}
MARIADB_USER: ${OH_MARIADB_USER}
MARIADB_PASSWORD: ${OH_MARIADB_PASSWORD}
DEMO_LANG: en
volumes:
- ./deps/openhospital-core/sql:/database-sources # /docker-entrypoint-initdb.d
networks:
- hospital-net
backend:
container_name: backend
build:
context: .
dockerfile: Dockerfile.backend
args:
OH_CORE_BRANCH: ${OH_CORE_BRANCH}
OH_API_BRANCH: ${OH_API_BRANCH}
GITHUB_ORG: ${GITHUB_ORG}
restart: always
ports:
- "${API_PORT}:8080"
depends_on:
- database
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "10"
networks:
- hospital-net
networks:
hospital-net:
driver: bridge