init compose
This commit is contained in:
commit
dc4006f506
10 changed files with 488 additions and 0 deletions
79
photoview/docker-compose.yml
Normal file
79
photoview/docker-compose.yml
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
photoview-db:
|
||||
image: mariadb:10.5
|
||||
container_name: photoview-db
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- proxy
|
||||
environment:
|
||||
- MYSQL_DATABASE=photoview
|
||||
- MYSQL_USER=photoview
|
||||
- MYSQL_PASSWORD=photosecret
|
||||
- MYSQL_RANDOM_ROOT_PASSWORD=1
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
photoview:
|
||||
image: viktorstrate/photoview:2
|
||||
container_name: photoview
|
||||
restart: unless-stopped
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
networks:
|
||||
- proxy
|
||||
# ports:
|
||||
# - "8101:80"
|
||||
depends_on:
|
||||
- photoview-db
|
||||
|
||||
environment:
|
||||
- PHOTOVIEW_DATABASE_DRIVER=mysql
|
||||
- PHOTOVIEW_MYSQL_URL=photoview:photosecret@tcp(photoview-db)/photoview
|
||||
- PHOTOVIEW_LISTEN_IP=photoview
|
||||
- PHOTOVIEW_LISTEN_PORT=80
|
||||
- PHOTOVIEW_MEDIA_CACHE=/app/cache
|
||||
|
||||
# Optional: If you are using Samba/CIFS-Share and experience problems with "directory not found"
|
||||
# Enable the following Godebug
|
||||
# - GODEBUG=asyncpreemptoff=1
|
||||
|
||||
# Optional: To enable map related features, you need to create a mapbox token.
|
||||
# A token can be generated for free here https://account.mapbox.com/access-tokens/
|
||||
# It's a good idea to limit the scope of the token to your own domain, to prevent others from using it.
|
||||
# - MAPBOX_TOKEN=<YOUR TOKEN HERE>
|
||||
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- 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.
|
||||
- /tank/syncthing/config:/photos:ro
|
||||
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.photoview.entrypoints=http"
|
||||
- "traefik.http.routers.photoview.rule=Host(`photoview.${URL}`)"
|
||||
- "traefik.http.middlewares.photoview-https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.photoview.middlewares=photoview-https-redirect"
|
||||
- "traefik.http.routers.photoview-secure.entrypoints=https"
|
||||
- "traefik.http.routers.photoview-secure.rule=Host(`photoview.local.waylonwalker.com`)"
|
||||
- "traefik.http.routers.photoview-secure.tls=true"
|
||||
- "traefik.http.routers.photoview-secure.service=photoview"
|
||||
- "traefik.http.services.photoview.loadbalancer.server.port=80"
|
||||
- "traefik.docker.network=proxy"
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
api_cache:
|
||||
Loading…
Add table
Add a link
Reference in a new issue