-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (63 loc) · 1.85 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
version: '3.3'
services:
db:
image: mariadb:10.8.3-jammy
platform: linux/amd64
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MYSQL_PASSWORD=${DATABASE_PASSWORD}
- MYSQL_DATABASE=onisep
- MYSQL_USER=${DATABASE_USERNAME}
phpmyadmin:
image: phpmyadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRATY=1
ports:
- 8484:80
depends_on:
- db
onisep-api:
image: elki_97413/onisep:latest
build:
context: .
dockerfile: Dockerfile.prod
container_name: onisep-api
restart: always
ports:
- 5005:5005
depends_on:
- db
environment:
SECRET_KEY: ${SECRET_KEY}
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_HOST: db
ONISEP_EMAIL: ${ONISEP_EMAIL}
ONISEP_PASSWORD: ${ONISEP_PASSWORD}
ONISEP_APP_ID: ${ONISEP_APP_ID}
backend_upgrade:
image: elki_97413/onisep_backend_update:latest
build:
context: .
dockerfile: Dockerfile.database
environment:
DATABASE_HOST: db
DATABASE_USERNAME: ${DATABASE_USERNAME}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
depends_on:
- db
command:
- /bin/sh
- -c
- |
pipenv install --deploy --ignore-pipfile
echo "------- Dependencies installed -------"
pipenv run flask db upgrade
echo "------- Database upgraded -------"
volumes:
db: