2020-02-21 22:49:19 +01:00
|
|
|
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
|
|
|
|
|
2020-03-01 02:06:18 +01:00
|
|
|
photoview:
|
2020-04-05 18:54:13 +02:00
|
|
|
build:
|
|
|
|
context: "."
|
|
|
|
args:
|
2020-04-15 21:16:36 +02:00
|
|
|
- UI_PUBLIC_URL=/
|
|
|
|
|
|
|
|
# Change This: The url from which the web ui can access the backend
|
|
|
|
# Should by default be the value of PUBLIC_ENDPOINT with /api appended to it
|
2020-04-06 22:16:25 +02:00
|
|
|
- API_ENDPOINT=http://localhost:8000/api/
|
2020-04-05 18:54:13 +02:00
|
|
|
|
2020-02-21 22:49:19 +01:00
|
|
|
restart: always
|
2020-03-01 02:06:18 +01:00
|
|
|
ports:
|
|
|
|
- "8000:80"
|
2020-02-21 22:49:19 +01:00
|
|
|
depends_on:
|
|
|
|
- db
|
2020-04-05 18:54:13 +02:00
|
|
|
|
2020-02-21 22:49:19 +01:00
|
|
|
environment:
|
|
|
|
- MYSQL_URL=photoview:photo-secret@tcp(db)/photoview
|
2020-04-06 22:16:25 +02:00
|
|
|
- API_LISTEN_IP=photoview
|
|
|
|
- API_LISTEN_PORT=80
|
2020-02-21 22:49:19 +01:00
|
|
|
- PHOTO_CACHE=/app/cache
|
2020-04-06 22:16:25 +02:00
|
|
|
- SERVE_UI=1
|
|
|
|
|
2020-04-15 21:16:36 +02:00
|
|
|
# Change This: The publicly exposed url
|
2020-02-21 22:49:19 +01:00
|
|
|
# For example if the server is available from the domain example.com,
|
2020-04-06 22:16:25 +02:00
|
|
|
# change this value to http://example.com/
|
2020-04-05 18:54:13 +02:00
|
|
|
- PUBLIC_ENDPOINT=http://localhost:8000/
|
|
|
|
|
2020-02-21 22:49:19 +01:00
|
|
|
volumes:
|
2020-04-06 22:16:25 +02:00
|
|
|
- api_cache:/app/cache
|
|
|
|
|
2020-02-21 22:49:19 +01:00
|
|
|
# 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:
|