51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
version: "3"
|
|
|
|
services:
|
|
db:
|
|
image: mariadb
|
|
restart: always
|
|
environment:
|
|
- MYSQL_DATABASE=photoview
|
|
- MYSQL_USER=photoview
|
|
- MYSQL_PASSWORD=photo-secret
|
|
- MYSQL_RANDOM_ROOT_PASSWORD=1
|
|
volumes:
|
|
- db_data:/var/lib/mysql
|
|
|
|
photoview:
|
|
build:
|
|
context: "."
|
|
args:
|
|
- API_ENDPOINT=http://localhost:8000/api/
|
|
|
|
restart: always
|
|
ports:
|
|
- "8000:80"
|
|
depends_on:
|
|
- db
|
|
|
|
environment:
|
|
- MYSQL_URL=photoview:photo-secret@tcp(db)/photoview
|
|
- API_LISTEN_IP=photoview
|
|
- API_LISTEN_PORT=80
|
|
- PHOTO_CACHE=/app/cache
|
|
- SERVE_UI=1
|
|
|
|
# Change This: The publicly exposed url for the api
|
|
# For example if the server is available from the domain example.com,
|
|
# change this value to http://example.com/
|
|
- PUBLIC_ENDPOINT=http://localhost:8000/
|
|
|
|
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.
|
|
- ./photos_path:/photos:ro
|
|
|
|
volumes:
|
|
db_data:
|
|
api_cache:
|