feat: Use PostgreSQL
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
71e97a1819
commit
c6dd4c04f3
5 changed files with 49 additions and 6 deletions
6
templates/db.env.j2
Normal file
6
templates/db.env.j2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{{ ansible_managed | comment }}
|
||||
POSTGRES_USER={{ coller_db_user }}
|
||||
POSTGRES_PASSWORD={{ coller_db_password }}
|
||||
POSTGRES_DB={{ coller_db_name }}
|
||||
POSTGRES_INITDB_ARGS="--data-checksums"
|
||||
POSTGRES_HOST_AUTH_METHOD=scram-sha-256
|
||||
|
|
@ -6,8 +6,27 @@ services:
|
|||
build: /opt/coller
|
||||
container_name: collerd
|
||||
restart: always
|
||||
networks:
|
||||
- coller
|
||||
ports:
|
||||
- "{{ coller_port }}:8080"
|
||||
volumes:
|
||||
- "{{ coller_config_dir }}/collerd.json:/etc/collerd.json:ro"
|
||||
command: collerd -config /etc/collerd.json
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
hostname: db
|
||||
container_name: collerd_db
|
||||
restart: always
|
||||
env_file: {{ coller_config_dir }}/db.env
|
||||
networks:
|
||||
- coller
|
||||
volumes:
|
||||
- coller:/var/lib/postgresql/data
|
||||
|
||||
networks:
|
||||
coller:
|
||||
|
||||
volumes:
|
||||
coller:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue