Docker icon indicating copy to clipboard operation
Docker copied to clipboard

Resetup on container recreation

Open AdriDevelopsThings opened this issue 4 years ago • 1 comments
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

AdriDevelopsThings avatar Nov 29 '20 16:11 AdriDevelopsThings

There's another environment variable that you can set that will skip the setup on container restart :

DOCKER=true

InputObject2 avatar Jul 08 '21 16:07 InputObject2