Docker fixes
This commit is contained in:
parent
bf4d2c90be
commit
89f71df00a
2 changed files with 23 additions and 33 deletions
|
@ -1,10 +1,7 @@
|
||||||
# This file is used to store environment variables for the application
|
# This file is used to store environment variables for the application
|
||||||
# Database Connection Information
|
# Database Connection Information
|
||||||
POSTGRES_HOST=localhost
|
|
||||||
POSTGRES_PORT=5432
|
|
||||||
POSTGRES_PASSWORD=password
|
POSTGRES_PASSWORD=password
|
||||||
POSTGRES_USER=atridadlahiji
|
POSTGRES_USER=username
|
||||||
POSTGRES_DB=pollo
|
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
ENCRYPTION_KEY="super-secret"
|
ENCRYPTION_KEY="super-secret"
|
||||||
|
@ -12,4 +9,4 @@ SIGNING_KEY="super-secret"
|
||||||
AUTH_SECRET="super-secret"
|
AUTH_SECRET="super-secret"
|
||||||
|
|
||||||
# Feature Flags
|
# Feature Flags
|
||||||
DEVMODE=true
|
DEVMODE=true
|
||||||
|
|
|
@ -1,49 +1,42 @@
|
||||||
version: "3"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: atridad:latest
|
image: pollo:latest
|
||||||
command: ["/app"]
|
command: ["/app"]
|
||||||
pull_policy: build
|
pull_policy: build
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_started
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- "3131:3000"
|
- "3000:3000"
|
||||||
networks:
|
|
||||||
- proxy_default
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_HOST=$POSTGRES_HOST
|
- POSTGRES_HOST=db
|
||||||
- POSTGRES_PORT=$POSTGRES_PORT
|
- POSTGRES_PORT=5432
|
||||||
- POSTGRES_DB=$POSTGRES_DB
|
- POSTGRES_DB=helpapp
|
||||||
- POSTGRES_USER=$POSTGRES_USER
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
- AUTH_SECRET=$AUTH_SECRET
|
- AUTH_SECRET=${AUTH_SECRET}
|
||||||
- ENCRYPTION_KEY=$ENCRYPTION_KEY
|
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
||||||
- DEVMODE=$DEVMODE
|
- DEVMODE=${DEVMODE}
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: 'postgres:latest'
|
image: "postgres:16-alpine"
|
||||||
pull_policy: build
|
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=$POSTGRES_DB
|
- POSTGRES_DB=pollo
|
||||||
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
- POSTGRES_USER=$POSTGRES_USER
|
- POSTGRES_USER=${POSTGRES_USER}
|
||||||
ports:
|
ports:
|
||||||
- 5433:5432
|
- 5432:5432
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
networks:
|
|
||||||
- proxy_default
|
|
||||||
restart: on-failure:3
|
restart: on-failure:3
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "sh", "-c", "pg_isready -h db -p 5432 -U ${POSTGRES_USER}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 10
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|
||||||
networks:
|
|
||||||
proxy_default:
|
|
||||||
name: proxy_default
|
|
||||||
external: true
|
|
Loading…
Add table
Reference in a new issue