posaune
[timetracker.git] / docker-compose.yml
1 # This file is for development work. Not suitable for production.
2 version: '3.7'
3
4 services:
5   # anuko_tt is a web application built as per dockerfile specification.
6   anuko_tt:
7     build:
8       context: .
9       dockerfile: dockerfile-tt
10     image: anuko_timetracker:dev
11     container_name: anuko-timetracker
12     # Use localhost:8080 to connect to timetracker via browser.
13     ports:
14      - "8080:80"
15
16   # anuko_db is a mariadb instance to which timetracker connects.
17   # Connect parameters are also specified in timetracker dockerfile after
18   # creation of its configuration file. Specifically, we replace
19   # user name, password, service name (aka resolvable to IP server name
20   # where mariadb runs), and database name there from the defaults.
21   # These two sets of credentials must match for a successful connect.
22   anuko_db:
23     build:
24       context: .
25       dockerfile: dockerfile-db
26     image: "anuko_database:dev"
27     container_name: anuko-database
28     environment:
29       MYSQL_RANDOM_ROOT_PASSWORD: "yes"
30       MYSQL_DATABASE: timetracker
31       MYSQL_USER: anuko_user
32       MYSQL_PASSWORD: anuko_pw
33     volumes:
34       - anuko_db:/var/lib/mysql
35
36 volumes:
37    anuko_db: