Initial work done on Docker composition of TT and MariaDB together.
[timetracker.git] / docker-compose.yml
1 version: '3.7'
2
3 services:
4   # anuko_tt is a web application built as per Dockerfile specification.
5   anuko_tt:
6     build: .
7     image: anuko_timetracker:dev
8     container_name: anuko-timetracker
9     # Use localhost:8080 to connect to timetracker via browser.
10     ports:
11      - "8080:80"
12
13   # anuko_sql is a mariadb instance to which timetracker connects.
14   # Connect parameters are also specified in timetracker Dockerfile after
15   # creation of its configuration file. Specifically, we replace
16   # user name, password, service name (aka resolvable to IP server name
17   # where mariadb runs), and database name there from the defaults.
18   # Apparently, these two sets of credentials must match for successful connect.
19   anuko_sql:
20     image: "mariadb:latest"
21     container_name: anuko-sql
22     environment:
23       MYSQL_RANDOM_ROOT_PASSWORD: "yes"
24       MYSQL_DATABASE: timetracker
25       MYSQL_USER: anuko_user
26       MYSQL_PASSWORD: anuko_pw