Changed db mount path

Fixes #65
This commit is contained in:
CapsLock 2021-05-01 20:51:01 +02:00
parent 4561302480
commit b0cfaad9a3
3 changed files with 8 additions and 4 deletions

View file

@ -110,7 +110,11 @@ The app will be available at http://localhost:2244.
Database is saved under `db` folder. This folder is mounted in `app` container to persist data changes on host disk. Database is saved under `db` folder. This folder is mounted in `app` container to persist data changes on host disk.
For development purpose, you can use both `docker-compose.yml` and `docker-compose-dev.yml` which allows you to work on copanier source code and make gunicorn automatically reload workers when code changes. For development purpose, you can use both `docker-compose.yml` and `docker-compose-dev.yml` which allows you to work on copanier source code and make gunicorn automatically reload workers when code changes:
```bash
sudo docker-compose -p copanier -f docker-compose.yml -f docker-compose-dev.yml up
```
## Run local server ## Run local server

View file

@ -1,4 +1,4 @@
version: "3.9" version: "3.3"
services: services:
app: app:
command: /srv/copanier-venv/bin/gunicorn -k roll.worker.Worker copanier:app --bind 0.0.0.0:2244 --reload --log-level debug --access-logfile - --error-logfile - command: /srv/copanier-venv/bin/gunicorn -k roll.worker.Worker copanier:app --bind 0.0.0.0:2244 --reload --log-level debug --access-logfile - --error-logfile -

View file

@ -1,4 +1,4 @@
version: "3.9" version: "3.3"
services: services:
app: app:
build: build:
@ -6,7 +6,7 @@ services:
dockerfile: "./docker/Dockerfile" dockerfile: "./docker/Dockerfile"
command: /srv/copanier-venv/bin/gunicorn -k roll.worker.Worker copanier:app --bind 0.0.0.0:2244 command: /srv/copanier-venv/bin/gunicorn -k roll.worker.Worker copanier:app --bind 0.0.0.0:2244
volumes: volumes:
- "../copanier/db:/srv/copanier/db" # To persist database changes - "../db:/srv/copanier/db" # To persist database changes
restart: always restart: always
static: static:
image: "nginx:latest" image: "nginx:latest"