[+] add postgresql

This commit is contained in:
Siarhei Siniak 2025-07-02 12:21:55 +03:00
parent 976576f8c6
commit c82107bad1
4 changed files with 27 additions and 0 deletions

@ -1,3 +1,4 @@
.venv
tmp
.git
.env

@ -1,2 +1,3 @@
!.tmuxp/
!python
.env/

@ -22,3 +22,28 @@ services:
limits:
cpus: '0.5'
memory: 128M
postgresql:
image: docker.io/postgres:14.18-bookworm@sha256:c0aab7962b283cf24a0defa5d0d59777f5045a7be59905f21ba81a20b1a110c9
# restart: always
# set shared memory limit when using docker compose
shm_size: 128mb
# or set shared memory limit when deploy via swarm stack
#volumes:
# - type: tmpfs
# target: /dev/shm
# tmpfs:
# size: 134217728 # 128*2^20 bytes = 128Mb
env_file: .env/postgresql.env
# environment:
# POSTGRES_PASSWORD: example
logging:
driver: "json-file"
options:
max-size: 10m
max-file: "3"
deploy:
resources:
limits:
cpus: '0.5'
memory: 128M