diff --git a/ansible/docker-compose-prod.yml.j2 b/ansible/docker-compose-prod.yml.j2 index 4245299..fb86d49 100644 --- a/ansible/docker-compose-prod.yml.j2 +++ b/ansible/docker-compose-prod.yml.j2 @@ -9,11 +9,11 @@ services: replicas: 2 resources: limits: - cpus: "1.0" - memory: 512M + cpus: "1.5" + memory: 1G reservations: - cpus: "0.25" - memory: 128M + cpus: "0.5" + memory: 256M restart: unless-stopped group_add: - "{{ docker_gid }}" @@ -36,11 +36,11 @@ services: deploy: resources: limits: - cpus: "1.5" - memory: 2G + cpus: "2.0" + memory: 4G reservations: cpus: "0.5" - memory: 512M + memory: 1G environment: POSTGRES_USER: e-ticket POSTGRES_PASSWORD: {{ db_password }} @@ -55,6 +55,12 @@ services: - wal_keep_size=64MB - -c - hot_standby=on + - -c + - shared_buffers=1GB + - -c + - effective_cache_size=3GB + - -c + - work_mem=16MB volumes: - db-master-data:/var/lib/postgresql/data - ./docker/pgsql/init-master.sh:/docker-entrypoint-initdb.d/init-master.sh @@ -72,11 +78,11 @@ services: deploy: resources: limits: - cpus: "1.0" - memory: 1G + cpus: "1.5" + memory: 2G reservations: cpus: "0.25" - memory: 256M + memory: 512M environment: POSTGRES_USER: e-ticket POSTGRES_PASSWORD: {{ db_password }} @@ -104,11 +110,11 @@ services: deploy: resources: limits: - cpus: "0.25" - memory: 64M + cpus: "0.5" + memory: 128M reservations: - cpus: "0.05" - memory: 16M + cpus: "0.1" + memory: 32M volumes: - ./docker/pgsql/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini:ro - ./docker/pgsql/userlist.txt:/etc/pgbouncer/userlist.txt:ro @@ -134,11 +140,11 @@ services: replicas: 2 resources: limits: - cpus: "0.5" - memory: 384M + cpus: "1.0" + memory: 512M reservations: - cpus: "0.1" - memory: 64M + cpus: "0.25" + memory: 128M restart: unless-stopped volumes: - .:/app @@ -158,12 +164,12 @@ services: deploy: resources: limits: - cpus: "0.5" - memory: 256M + cpus: "1.0" + memory: 1G reservations: - cpus: "0.1" - memory: 64M - command: redis-server --requirepass {{ redis_password }} --maxmemory 200mb --maxmemory-policy allkeys-lru + cpus: "0.25" + memory: 128M + command: redis-server --requirepass {{ redis_password }} --maxmemory 768mb --maxmemory-policy allkeys-lru volumes: - redis-data:/data networks: @@ -180,11 +186,11 @@ services: deploy: resources: limits: - cpus: "0.5" - memory: 512M + cpus: "1.0" + memory: 1G reservations: - cpus: "0.1" - memory: 128M + cpus: "0.25" + memory: 256M environment: MEILI_MASTER_KEY: {{ meilisearch_master_key }} MEILI_ENV: production