mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 16:46:51 +02:00
Added kafka and springBoot roles, minor cleanup, and use ansible-vault to hide sensitive data
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name {{ spring_domain }};
|
||||
|
||||
location ^~ /.well-known/acme-challenge/ {
|
||||
default_type "text/plain";
|
||||
}
|
||||
|
||||
{% for app in spring_apps %}
|
||||
{% if app.expose %}
|
||||
location {{ app.path }} {
|
||||
proxy_pass http://localhost:{{ app.port }};
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
{% for app in spring_apps %}
|
||||
{{ app.name }}:
|
||||
image: {{ app.image }}:{{ lookup('ansible.builtin.vars', app.name + '_image_version') }}
|
||||
{% if app.expose %}
|
||||
ports:
|
||||
- "{{ app.port }}:{{ app.port }}"
|
||||
{% else %}
|
||||
expose:
|
||||
- "{{ app.port }}"
|
||||
{% endif %}
|
||||
{% if 'depends_on' in app %}
|
||||
depends_on: {{ app.depends_on }}
|
||||
{% endif %}
|
||||
restart: always
|
||||
networks:
|
||||
- kafka
|
||||
{% if app.has_environment %}
|
||||
environment: {{ lookup('ansible.builtin.vars', app.name + '_environment') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
networks:
|
||||
kafka:
|
||||
name: kafka
|
||||
external: true
|
||||
Reference in New Issue
Block a user