PostgreSQL configuration Example¶
About PostgreSQL¶
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.
More information about PostgreSQL¶
How to add PostgreSQL 18 to Qlico?¶
Add the following YAML to the services section of your docker-compose.yaml
file.
qlico-core/docker-compose.yaml
postgres18:
image: postgres:18
container_name: qlico-core_postgres18
logging:
driver: none
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qlico}
volumes:
- postgres18-data:/var/lib/postgresql/data
networks:
- qlico-core
Add the following YAML to the volumes section of your docker-compose.yaml
file.
qlico-core/docker-compose.yaml
postgres18-data:
name: qlico-core_postgres18-data
Example in a full docker-compose file¶
This is a large example, so you know where to place the PostgreSQL service and volume.
qlico-core/docker-compose.yaml
---
# Author: Qlico <hello@qlico.dev>
services:
traefik:
image: traefik:v3.5.4
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"
postgres18:
image: postgres:18
container_name: qlico-core_postgres18
logging:
driver: none
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qlico}
volumes:
- postgres18-data:/var/lib/postgresql/data
networks:
- qlico-core
volumes:
postgres18-data:
name: qlico-core_postgres18-data
networks:
qlico-core:
driver: bridge
name: qlico-core
How to add PostgreSQL 17 to Qlico?¶
Add the following YAML to the services section of your docker-compose.yaml
file.
qlico-core/docker-compose.yaml
postgres17:
image: {{ no such element: super_collections.SuperDict object['postgres17'] }}
container_name: qlico-core_postgres17
logging:
driver: none
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qlico}
volumes:
- postgres17-data:/var/lib/postgresql/data
networks:
- qlico-core
Add the following YAML to the volumes section of your docker-compose.yaml
file.
qlico-core/docker-compose.yaml
postgres17-data:
name: qlico-core_postgres17-data
Example in a full docker-compose file¶
This is a large example, so you know where to place the PostgreSQL service and volume.
qlico-core/docker-compose.yaml
---
# Author: Qlico <hello@qlico.dev>
services:
traefik:
image: traefik:v3.5.4
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"
postgres17:
image: {{ no such element: super_collections.SuperDict object['postgres17'] }}
container_name: qlico-core_postgres17
logging:
driver: none
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-qlico}
volumes:
- postgres17-data:/var/lib/postgresql/data
networks:
- qlico-core
volumes:
postgres17-data:
name: qlico-core_postgres17-data
networks:
qlico-core:
driver: bridge
name: qlico-core