initial fotky docker compose

This commit is contained in:
2022-12-15 14:40:10 +01:00
commit 1047c73a23

56
docker-compose.yml Normal file
View File

@@ -0,0 +1,56 @@
version: "3"
services:
db:
image: mariadb:10.5
restart: always
environment:
- MYSQL_DATABASE=photoview
- MYSQL_USER=photoview
- MYSQL_PASSWORD=photosecret
- MYSQL_RANDOM_ROOT_PASSWORD=1
volumes:
- db_data:/var/lib/mysql
photoview:
container_name: photo
image: viktorstrate/photoview:2
restart: unless-stopped
depends_on:
- db
- caddy
environment:
- PHOTOVIEW_DATABASE_DRIVER=mysql
- PHOTOVIEW_MYSQL_URL=photoview:photosecret@tcp(db)/photoview
- PHOTOVIEW_LISTEN_IP=photoview
- PHOTOVIEW_LISTEN_PORT=80
- PHOTOVIEW_MEDIA_CACHE=/app/cache
volumes:
- api_cache:/app/cache
# Change This: to the directory where your photos are located on your server.
# If the photos are located at `/home/user/photos`, then change this value
# to the following: `/home/user/photos:/photos:ro`.
# You can mount multiple paths, if your photos are spread across multiple directories.
- /mnt/fotky:/photos:ro
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /home/ubuntu/etc/caddy:/etc/caddy:ro
dockupdater:
image: dockupdater/dockupdater
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
db_data:
api_cache: