Docker changes

Added:
Healthchecks
Changed Postgres to Alpine + pinned
Pinned Traefik Version
Made Env Vars easier to see + change/reference for those using their own env file.
This commit is contained in:
modem7
2022-03-23 22:52:30 +00:00
parent 884975dda6
commit 79ddd887d9
4 changed files with 52 additions and 7 deletions

View File

@ -2,7 +2,7 @@ version: '3'
services:
postgres:
image: postgres
image: postgres:14.2-alpine
container_name: postgres
ports:
- 5432:5432
@ -10,6 +10,13 @@ services:
volumes:
- ./scripts/database/initialize.sql:/docker-entrypoint-initdb.d/initialize.sql
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres" ]
interval: 30s
timeout: 30s
start_period: 15s
retries: 3
restart: always
traefik:
image: traefik