[+] improve compose

This commit is contained in:
Siarhei Siniak 2025-07-02 12:29:45 +03:00
parent c82107bad1
commit d01386a4dc
3 changed files with 13 additions and 1 deletions

@ -36,5 +36,8 @@ pyright:
-v $(ENV_PATH)
compose_env:
cat docker/postgresql/.env .env/postgresql.env > .env/postgresql.patched.env
compose_build_web:
$(COMPOSE) build web

@ -28,13 +28,15 @@ services:
# restart: always
# set shared memory limit when using docker compose
shm_size: 128mb
volumes:
- postgresql_data:/var/lib/postgresql/data/:rw
# 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
env_file: .env/postgresql.patched.env
# environment:
# POSTGRES_PASSWORD: example
logging:
@ -47,3 +49,7 @@ services:
limits:
cpus: '0.5'
memory: 128M
volumes:
postgresql_data:

@ -0,0 +1,3 @@
PGDATA=/var/lib/postgresql/data/pgdata
POSTGRES_USER=tickers
POSTGRES_DB=tickers