cortezaproject / corteza-docs

Documentation, manual, instructions
https://docs.cortezaproject.org
Apache License 2.0
124 stars 69 forks source link

devops-guide/index.html missing "volumes" in docker-compose.yaml #279

Open nzidol opened 2 years ago

nzidol commented 2 years ago

Doc explains setup of directories but those are not mounted onto the docker images in the yaml. Meaning you lose your data when upgrading....

version: '3.5'

services: server: image: cortezaproject/corteza:${VERSION} restart: always env_file: [ .env ] depends_on: [ db ] ports: [ "127.0.0.1:18080:80" ] volumes: [ "./data/server:/data" ]

volumes: ["./corteza-locale:/my-locale"]

db:

MySQL Database

# See https://hub.docker.com/r/percona/percona-server for details
image: percona:8.0
restart: always
**volumes: [ "./data/db:/var/lib/mysql" ]**
environment:
  MYSQL_DATABASE: dbname
  MYSQL_USER:     dbuser
  MYSQL_PASSWORD: dbpass
  # get the random generated password by running: docker-compose logs db | grep "GENERATED ROOT PASSWORD"
  MYSQL_RANDOM_ROOT_PASSWORD: random
healthcheck: { test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"], timeout: 20s, retries: 10 }
tjerman commented 1 year ago

Don't see the harm in either adding the volumes to the config, or adding a caution about it. Perhaps the local demo could go with a caution and the production one should have the volumes mounted.