X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=docker-compose.yml;h=e621c4105997d014b4ffe56031f13758f5d22400;hb=HEAD;hp=b5ecef92403b04c13c5df352e15d42c25de1f7fc;hpb=2f28666efaac80c4cd7e9f6d879dc4c20803e9a6;p=timetracker.git diff --git a/docker-compose.yml b/docker-compose.yml index b5ecef92..e621c410 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,26 +1,37 @@ +# This file is for development work. Not suitable for production. version: '3.7' services: - # anuko_tt is a web application built as per Dockerfile specification. + # anuko_tt is a web application built as per dockerfile specification. anuko_tt: - build: . + build: + context: . + dockerfile: dockerfile-tt image: anuko_timetracker:dev container_name: anuko-timetracker # Use localhost:8080 to connect to timetracker via browser. ports: - "8080:80" - # anuko_sql is a mariadb instance to which timetracker connects. - # Connect parameters are also specified in timetracker Dockerfile after + # anuko_db is a mariadb instance to which timetracker connects. + # Connect parameters are also specified in timetracker dockerfile after # creation of its configuration file. Specifically, we replace # user name, password, service name (aka resolvable to IP server name # where mariadb runs), and database name there from the defaults. - # Apparently, these two sets of credentials must match for successful connect. - anuko_sql: - image: "mariadb:latest" - container_name: anuko-sql + # These two sets of credentials must match for a successful connect. + anuko_db: + build: + context: . + dockerfile: dockerfile-db + image: "anuko_database:dev" + container_name: anuko-database environment: MYSQL_RANDOM_ROOT_PASSWORD: "yes" MYSQL_DATABASE: timetracker MYSQL_USER: anuko_user MYSQL_PASSWORD: anuko_pw + volumes: + - anuko_db:/var/lib/mysql + +volumes: + anuko_db: \ No newline at end of file