Template
fix: server deploy setup and env example
This commit is contained in:
+7
-5
@@ -3,16 +3,17 @@ services:
|
||||
image: postgres:16-alpine
|
||||
container_name: panel-postgres
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
environment:
|
||||
POSTGRES_USER: panel
|
||||
POSTGRES_PASSWORD: panel_secret
|
||||
POSTGRES_DB: panel
|
||||
POSTGRES_USER: ${POSTGRES_USER:-panel}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-panel_secret}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-panel}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U panel -d panel"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-panel} -d ${POSTGRES_DB:-panel}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@@ -22,11 +23,12 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile.migrate
|
||||
container_name: panel-migrate
|
||||
env_file: .env
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
command:
|
||||
- "postgres://panel:panel_secret@postgres:5432/panel?sslmode=disable"
|
||||
- "${DATABASE_URL_DOCKER:-postgres://panel:panel_secret@postgres:5432/panel?sslmode=disable}"
|
||||
- "up"
|
||||
profiles:
|
||||
- migrate
|
||||
|
||||
Reference in New Issue
Block a user