forked from volkszaehler/volkszaehler.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·52 lines (48 loc) · 1.33 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
version: '3'
services:
database:
image: mariadb
environment:
MYSQL_DATABASE: volkszaehler
MYSQL_USER: vz
MYSQL_PASSWORD: demo
MYSQL_ROOT_PASSWORD: admin_demo
networks:
- volkszaehler
volkszaehler:
image: volkszaehler/volkszaehler
ports:
- 8080:8080
# NOTE: The init command will only work once the database is fully up and running.
# By putting restart: always docker-compose will retry starting this container
# and finally complete the database setup sequence.
command: sh -c "
sed -i s/127.0.0.1/database/ /vz/etc/config.yaml &&
sed -i s/vz_admin/root/ /vz/etc/config.yaml &&
sleep 1 &&
(/vz/bin/doctrine orm:schema-tool:update --force || /vz/bin/doctrine orm:schema-tool:create) &&
/vz/vendor/bin/ppm start -c /vz/etc/middleware.json --static-directory /vz/htdocs --cgi-path=/usr/bin/php"
links:
- database
depends_on:
- database
networks:
- volkszaehler
restart: always
push-server:
image: volkszaehler/volkszaehler
ports:
- 5582:5582
- 8082:8082
command: sh -c "
sed -i s/127.0.0.1/database/ /vz/etc/config.yaml &&
/vz/bin/push-server"
links:
- database
depends_on:
- database
networks:
- volkszaehler
restart: always
networks:
volkszaehler: