From 82f853ccbcdf4472a74b91c07ca496e013487e4f Mon Sep 17 00:00:00 2001 From: XGamerGuide Date: Sun, 5 Nov 2023 02:06:20 +0100 Subject: [PATCH] Add `docker-compose.yml` --- docker-compose.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2944c77 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3' +services: + diary: + build: https://github.com/dodaucy/diary.git + environment: + DATABASE: "mysql://diary:diary@mariadb/diary" + PASSWORD_HASH: ${PASSWORD_HASH:?Password hash not set} + env_file: + - .env + ports: + - $127.0.0.1:${PORT:?Port not set}:8000 + depends_on: + - mariadb + restart: always + mariadb: + image: mariadb:latest + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: diary + MYSQL_USER: diary + MYSQL_PASSWORD: diary + volumes: + - ./data/mariadb:/var/lib/mysql + ports: + - 3306:3306 + restart: always