File tree Expand file tree Collapse file tree
fastapi_forge/template/{{cookiecutter.project_name}} Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,25 @@ services:
100100 volumes :
101101 - {{ cookiecutter.project_name }}-redis-data:/bitnami/redis/data
102102 {% endif %}
103+ {%- if cookiecutter.use_rabbitmq -%}
104+ rabbitmq :
105+ image : rabbitmq:3-management
106+ container_name : {{ cookiecutter.project_name }}-rabbitmq
107+ ports :
108+ - " 15672:15672"
109+ - " 5672:5672"
110+ environment :
111+ RABBITMQ_DEFAULT_USER : user
112+ RABBITMQ_DEFAULT_PASS : password
113+ RABBITMQ_DEFAULT_VHOST : /
114+ healthcheck :
115+ test : rabbitmq-diagnostics -q check_running
116+ interval : 2s
117+ timeout : 3s
118+ retries : 40
119+ volumes :
120+ - {{ cookiecutter.project_name }}-rabbitmq-data:/var/lib/rabbitmq
121+ {% endif %}
103122volumes :
104123 {%- if cookiecutter.use_postgres %}
105124 {{ cookiecutter.project_name }}-pg-data:
@@ -108,4 +127,8 @@ volumes:
108127 {%- if cookiecutter.use_redis %}
109128 {{ cookiecutter.project_name }}-redis-data:
110129 name : {{ cookiecutter.project_name }}-redis-data
130+ {% endif %}
131+ {%- if cookiecutter.use_rabbitmq -%}
132+ {{ cookiecutter.project_name }}-rabbitmq-data:
133+ name : {{ cookiecutter.project_name }}-rabbitmq-data
111134 {% endif %}
You can’t perform that action at this time.
0 commit comments