PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
- PostgreSQL website{:target="_blank"}
- PostgreSQL on Docker Hub{:target="_blank"}
Add the following YAML to the services
section of your docker-compose.yaml
file.
postgres16:
image: postgres:16-alpine
container_name: qlico-core_postgres14
logging:
driver: none
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qlico}
volumes:
- postgres16-data:/var/lib/postgresql/data
networks:
- qlico-core
Add the following YAML to the volumes
section of your docker-compose.yaml
file.
postgres16-data:
name: qlico-core_postgres16-data
This is a large example, so you know where to place the PostgreSQL service and volume.
---
# Author: Qlico <[email protected]>
services:
traefik:
image: traefik:v3.0
container_name: qlico-core_traefik
command: [ '--providers.docker', '--api.insecure' ]
networks:
- qlico-core
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- "traefik.http.routers.traefik.rule=Host(`traefik.qlico`)"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
postgres16:
image: postgres:16-alpine
container_name: qlico-core_postgres14
logging:
driver: none
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qlico}
volumes:
- postgres16-data:/var/lib/postgresql/data
networks:
- qlico-core
volumes:
postgres16-data:
name: qlico-core_postgres16-data
networks:
qlico-core:
driver: bridge
name: qlico-core