Initial commit
This commit is contained in:
commit
349acfb9c2
4 changed files with 58 additions and 0 deletions
19
README.md
Normal file
19
README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Photoview - Docker
|
||||
This repository aims to provide a docker-compose file for <https://github.com/photoview/photoview>.
|
||||
|
||||
## Installation
|
||||
A Mapbox token should be provided in a `mapbox.env` file with the following syntax:
|
||||
```
|
||||
MAPBOX_TOKEN={{example}}
|
||||
```
|
||||
|
||||
The docker can then be started with:
|
||||
```
|
||||
docker-compose up -d --remove-orphans
|
||||
```
|
||||
|
||||
## Update
|
||||
Updates can be conducted using:
|
||||
```
|
||||
docker-compose pull
|
||||
```
|
4
db.env
Normal file
4
db.env
Normal file
|
@ -0,0 +1,4 @@
|
|||
MYSQL_DATABASE=photoview
|
||||
MYSQL_USER=photoview
|
||||
MYSQL_PASSWORD=photo-secret
|
||||
MYSQL_RANDOM_ROOT_PASSWORD=1
|
30
docker-compose.yml
Normal file
30
docker-compose.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb
|
||||
restart: always
|
||||
env_file:
|
||||
- db.env
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
|
||||
photoview:
|
||||
image: viktorstrate/photoview:latest
|
||||
restart: always
|
||||
ports:
|
||||
- "8123:80"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
env_file:
|
||||
- photoview.env
|
||||
- mapbox.env
|
||||
|
||||
volumes:
|
||||
- api_cache:/app/cache
|
||||
- /home/edpibu/Pictures:/edpibu/Pictures:ro
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
api_cache:
|
5
photoview.env
Normal file
5
photoview.env
Normal file
|
@ -0,0 +1,5 @@
|
|||
MYSQL_URL=photoview:photo-secret@tcp(db)/photoview
|
||||
API_LISTEN_IP=photoview
|
||||
API_LISTEN_PORT=80
|
||||
PHOTO_CACHE=/app/cache
|
||||
PUBLIC_ENDPOINT=https://photos.edgarpierre.fr/
|
Reference in a new issue