@@ -25,39 +25,10 @@ services:
2525 condition : service_healthy
2626 {%- endif %}
2727 {%- endif %}
28- environment :
29- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RELOAD: "True"
30- {{ cookiecutter.project_name|upper|replace('-', '_') }}_SERVER_HOST: 0.0.0.0
31- {{ cookiecutter.project_name|upper|replace('-', '_') }}_SERVER_PORT: 8000
32- {%- if cookiecutter.use_postgres %}
33- {{ cookiecutter.project_name|upper|replace('-', '_') }}_PG_HOST: {{ cookiecutter.project_name }}-pg
34- {{ cookiecutter.project_name|upper|replace('-', '_') }}_PG_PORT: 5432
35- {{ cookiecutter.project_name|upper|replace('-', '_') }}_PG_USER: {{ cookiecutter.project_name }}
36- {{ cookiecutter.project_name|upper|replace('-', '_') }}_PG_PASS: {{ cookiecutter.project_name }}
37- {{ cookiecutter.project_name|upper|replace('-', '_') }}_PG_DATABASE: {{ cookiecutter.project_name }}
38- {% endif %}
39- {%- if cookiecutter.use_redis %}
40- {{ cookiecutter.project_name|upper|replace('-', '_') }}_REDIS_HOST: "redis"
41- {{ cookiecutter.project_name|upper|replace('-', '_') }}_REDIS_PORT: 6379
42- {{ cookiecutter.project_name|upper|replace('-', '_') }}_REDIS_PASSWORD: ""
43- {{ cookiecutter.project_name|upper|replace('-', '_') }}_REDIS_MAX_CONNECTIONS: 50
44- {% endif %}
45- {%- if cookiecutter.use_rabbitmq -%}
46- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_HOST: "rabbitmq"
47- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_PORT: 5672
48- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_USER: "user"
49- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_PASSWORD: "password"
50- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_VHOST: "/"
51- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_CONNECTION_POOL_SIZE: 2
52- {{ cookiecutter.project_name|upper|replace('-', '_') }}_RABBITMQ_CHANNEL_POOL_SIZE: 10
53- {% endif %}
54- {%- if cookiecutter.use_rabbitmq -%}
55- {{ cookiecutter.project_name|upper|replace('-', '_') }}_PROMETHEUS_ENABLED: true
56- {% endif %}
5728 {%- if cookiecutter.use_alembic %}
5829 volumes :
5930 - ./migrations:/app/migrations
60- {% endif %}
31+ {%- endif %}
6132 develop :
6233 watch :
6334 - action : sync
@@ -66,31 +37,27 @@ services:
6637 - action : sync
6738 path : ./tests
6839 target : /app/tests
69- {%- if cookiecutter.use_alembic %}
70- - action : sync
71- path : ./migrations
72- target : /app/migrations
73- {%- endif %}
7440 - action : rebuild
7541 path : pyproject.toml
7642 - action : rebuild
7743 path : uv.lock
78- {% if cookiecutter.use_taskiq %}
44+
45+ {% if cookiecutter.use_taskiq -%}
7946 taskiq-worker :
8047 << : *api
81- container_name : game_zone -taskiq-worker
48+ container_name : {{ cookiecutter.project_name }} -taskiq-worker
8249 ports : []
8350 command : [ taskiq, worker, -fsd, src.services.taskiq.broker:broker, -w, "1", --max-fails, "1"]
8451
8552 taskiq-scheduler :
8653 << : *api
87- container_name : game_zone -taskiq-scheduler
54+ container_name : {{ cookiecutter.project_name }} -taskiq-scheduler
8855 ports : []
8956 command : [ taskiq, scheduler, -fsd, src.services.taskiq.scheduler:scheduler ]
90- {%- endif %}
91- {% if cookiecutter.use_postgres %}
57+ {% endif %}
58+ {%- if cookiecutter.use_postgres %}
9259 postgres :
93- image : postgres:13.8-bullseye
60+ image : postgres:17.4-bookworm
9461 hostname : {{ cookiecutter.project_name }}-pg
9562 container_name : {{ cookiecutter.project_name }}-pg
9663 environment :
@@ -123,7 +90,7 @@ services:
12390 volumes :
12491 - {{ cookiecutter.project_name }}-redis-data:/bitnami/redis/data
12592 {% endif %}
126- {%- if cookiecutter.use_rabbitmq -%}
93+ {% if cookiecutter.use_rabbitmq -%}
12794 rabbitmq :
12895 image : rabbitmq:3.8.27-management-alpine
12996 container_name : {{ cookiecutter.project_name }}-rabbitmq
@@ -142,9 +109,9 @@ services:
142109 volumes :
143110 - {{ cookiecutter.project_name }}-rabbitmq-data:/var/lib/rabbitmq
144111 {% endif %}
145- {%- if cookiecutter.use_prometheus -%}
112+ {% if cookiecutter.use_prometheus -%}
146113 prometheus :
147- image : prom/prometheus:latest
114+ image : prom/prometheus:v3.3.0
148115 restart : always
149116 volumes :
150117 - ./observability/prometheus/prometheus.yaml:/etc/prometheus/prometheus.yaml
@@ -157,14 +124,11 @@ services:
157124volumes :
158125 {%- if cookiecutter.use_postgres %}
159126 {{ cookiecutter.project_name }}-pg-data:
160- name : {{ cookiecutter.project_name }}-pg-data
161127 {%- endif %}
162128 {%- if cookiecutter.use_redis %}
163129 {{ cookiecutter.project_name }}-redis-data:
164- name : {{ cookiecutter.project_name }}-redis-data
165130 {% endif %}
166131 {%- if cookiecutter.use_rabbitmq -%}
167132 {{ cookiecutter.project_name }}-rabbitmq-data:
168- name : {{ cookiecutter.project_name }}-rabbitmq-data
169133 {% endif %}
170134{%- endif %}
0 commit comments