Docker
Docker copied to clipboard
Resetup on container recreation
trafficstars
Hello,
when I recreate my Cachet docker container, the Cachet must be resetuped.
But why I should resetup Cachet if I recreate my Cachet container.
Configs
docker-compose.yml
version: "3"
services:
postgres:
image: postgres:12-alpine
volumes:
- /var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=************************
restart: always
cachet:
build:
context: .
args:
- cachet_ver=2.4
ports:
- 127.0.0.2:81:8000
links:
- postgres:postgres
environment:
- DB_DRIVER=pgsql
- DB_HOST=postgres
- DB_PORT=5432
- DB_DATABASE=postgres
- DB_USERNAME=postgres
- DB_PASSWORD=************************
- DB_PREFIX=chq_
- APP_KEY=base64:********
- APP_LOG=errorlog
- APP_ENV=${APP_ENV:-production}
- APP_DEBUG=false
- DEBUG=false
- CACHE_DRIVER=database
- SESSION_DRIVER=database
- QUEUE_DRIVER=sync
- MAIL_DRIVER=smtp
- MAIL_HOST=mail.*****
- MAIL_PORT=587
- MAIL_USERNAME=status@****
- MAIL_PASSWORD=*****
- MAIL_ADDRESS=status@****
- MAIL_ENCRYPTION=tls
depends_on:
- postgres
restart: always
Executed command
docker-compose down && docker-compose up -d
There's another environment variable that you can set that will skip the setup on container restart :
DOCKER=true