From 97d2f66c6622e48e63fa664e2d116e437f5022d6 Mon Sep 17 00:00:00 2001 From: Davide Polonio Date: Mon, 22 May 2023 17:35:59 +0200 Subject: [PATCH] feat: add Monica as new service (#21) Co-authored-by: Davide Polonio Reviewed-on: https://git.poldebra.me/polpetta/server-dotfiles/pulls/21 --- .gitignore | 1 + diary/docker-compose.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 diary/docker-compose.yml diff --git a/.gitignore b/.gitignore index 0b1a287..9a81b07 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ config/ .env .idea/ env-searxng +.*.env diff --git a/diary/docker-compose.yml b/diary/docker-compose.yml new file mode 100644 index 0000000..e75f097 --- /dev/null +++ b/diary/docker-compose.yml @@ -0,0 +1,56 @@ +version: "3.9" + +services: + app: + image: monica:4-apache + depends_on: + - db + env_file: + - .monica.env + - .env + volumes: + - data:/var/www/html/storage + restart: unless-stopped + networks: + - internal + - proxy + + cron: + image: monica:4-apache + env_file: .monica.env + restart: unless-stopped + volumes: + - data:/var/www/html/storage + command: cron.sh + depends_on: + - db + + db: + image: mysql:8.0 + env_file: + - .mysql.env + volumes: + - mysql:/var/lib/mysql + restart: unless-stopped + networks: + - internal + +volumes: + data: + driver: local + driver_opts: + type: none + o: bind + device: "/srv/docker/diary/data" + mysql: + driver: local + driver_opts: + type: none + o: bind + device: "/srv/docker/diary/mysql" + +networks: + proxy: + external: true + internal: +