improve docker-compose setup
This commit is contained in:
@@ -5,12 +5,13 @@ services:
|
|||||||
image: mariadb
|
image: mariadb
|
||||||
container_name: mariadb
|
container_name: mariadb
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgres:/var/lib/postgresql/data
|
- ./db:/var/lib/mysql
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
environment:
|
environment:
|
||||||
- MARIADB_USER=gancio
|
- MARIADB_USER=gancio
|
||||||
- MARIADB_DATABASE=gancio
|
- MARIADB_DATABASE=gancio
|
||||||
- MARIADB_PASSWORD=gancio
|
- MARIADB_PASSWORD=gancio
|
||||||
|
- MARIADB_RANDOM_ROOT_PASSWORD=yes
|
||||||
restart: always
|
restart: always
|
||||||
gancio:
|
gancio:
|
||||||
build: .
|
build: .
|
||||||
@@ -21,6 +22,11 @@ services:
|
|||||||
- PATH=$PATH:/home/node/.yarn/bin
|
- PATH=$PATH:/home/node/.yarn/bin
|
||||||
- GANCIO_DATA=/home/node/data
|
- GANCIO_DATA=/home/node/data
|
||||||
- NODE_ENV=production
|
- 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
|
command: gancio start --docker
|
||||||
entrypoint: /entrypoint.sh
|
entrypoint: /entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ services:
|
|||||||
- PATH=$PATH:/home/node/.yarn/bin
|
- PATH=$PATH:/home/node/.yarn/bin
|
||||||
- GANCIO_DATA=/home/node/data
|
- GANCIO_DATA=/home/node/data
|
||||||
- NODE_ENV=production
|
- 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
|
command: gancio start --docker
|
||||||
entrypoint: /entrypoint.sh
|
entrypoint: /entrypoint.sh
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ services:
|
|||||||
- PATH=$PATH:/home/node/.yarn/bin
|
- PATH=$PATH:/home/node/.yarn/bin
|
||||||
- GANCIO_DATA=/home/node/data
|
- GANCIO_DATA=/home/node/data
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
- GANCIO_DB_DIALECT=sqlite
|
||||||
|
- GANCIO_DB_STORAGE=./gancio.sqlite
|
||||||
entrypoint: /entrypoint.sh
|
entrypoint: /entrypoint.sh
|
||||||
command: gancio start --docker
|
command: gancio start --docker
|
||||||
volumes:
|
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
|
1. Archive database, configuration, custom user locales, logs, images and thumbnails
|
||||||
```bash
|
```bash
|
||||||
sudo tar -czf gancio-$(date +%Y-%m-%d-%H%M%S)-backup.tgz \
|
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"
|
> info "Automatic backup"
|
||||||
|
|||||||
Reference in New Issue
Block a user