mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
improve docker-compose setup
This commit is contained in:
parent
55c066b845
commit
155932d1f3
4 changed files with 15 additions and 2 deletions
|
@ -5,12 +5,13 @@ services:
|
|||
image: mariadb
|
||||
container_name: mariadb
|
||||
volumes:
|
||||
- ./postgres:/var/lib/postgresql/data
|
||||
- ./db:/var/lib/mysql
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- MARIADB_USER=gancio
|
||||
- MARIADB_DATABASE=gancio
|
||||
- MARIADB_PASSWORD=gancio
|
||||
- MARIADB_RANDOM_ROOT_PASSWORD=yes
|
||||
restart: always
|
||||
gancio:
|
||||
build: .
|
||||
|
@ -21,6 +22,11 @@ services:
|
|||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
- GANCIO_DATA=/home/node/data
|
||||
- NODE_ENV=production
|
||||
- GANCIO_DB_DIALECT=mariadb
|
||||
- GANCIO_DB_HOST=db
|
||||
- GANCIO_DB_DATABASE=gancio
|
||||
- GANCIO_DB_USER=gancio
|
||||
- GANCIO_DB_PASSWORD=gancio
|
||||
command: gancio start --docker
|
||||
entrypoint: /entrypoint.sh
|
||||
volumes:
|
||||
|
|
|
@ -24,6 +24,11 @@ services:
|
|||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
- GANCIO_DATA=/home/node/data
|
||||
- NODE_ENV=production
|
||||
- GANCIO_DB_DIALECT=postgres
|
||||
- GANCIO_DB_HOST=db
|
||||
- GANCIO_DB_DATABASE=gancio
|
||||
- GANCIO_DB_USER=gancio
|
||||
- GANCIO_DB_PASSWORD=gancio
|
||||
command: gancio start --docker
|
||||
entrypoint: /entrypoint.sh
|
||||
volumes:
|
||||
|
|
|
@ -10,6 +10,8 @@ services:
|
|||
- PATH=$PATH:/home/node/.yarn/bin
|
||||
- GANCIO_DATA=/home/node/data
|
||||
- NODE_ENV=production
|
||||
- GANCIO_DB_DIALECT=sqlite
|
||||
- GANCIO_DB_STORAGE=./gancio.sqlite
|
||||
entrypoint: /entrypoint.sh
|
||||
command: gancio start --docker
|
||||
volumes:
|
||||
|
|
|
@ -23,7 +23,7 @@ sudo -u postgres pg_dump -Fc gancio > gancio.dump
|
|||
1. Archive database, configuration, custom user locales, logs, images and thumbnails
|
||||
```bash
|
||||
sudo tar -czf gancio-$(date +%Y-%m-%d-%H%M%S)-backup.tgz \
|
||||
$(ls -d config.json uploads user_locale db.sqlite gancio.dump postgres data logs 2> /dev/null)
|
||||
$(ls -d config.json uploads user_locale db.sqlite gancio.dump postgres data db logs 2> /dev/null)
|
||||
```
|
||||
|
||||
> info "Automatic backup"
|
||||
|
|
Loading…
Reference in a new issue