updates
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Managed by Ansible (roles/web-static). Do not edit by hand.
|
||||
services:
|
||||
web-static:
|
||||
image: {{ web_static_image }}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
{% for a in _static_apps %}
|
||||
- "{{ a.port }}:{{ a.port }}"
|
||||
{% endfor %}
|
||||
volumes:
|
||||
- {{ web_static_root }}:{{ web_static_root }}:ro
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
@@ -0,0 +1,19 @@
|
||||
# Managed by Ansible (roles/web-static). Do not edit by hand.
|
||||
{% for a in _static_apps %}
|
||||
server {
|
||||
listen {{ a.port }};
|
||||
server_name _;
|
||||
|
||||
root {{ (app_catalog[a.name].webroot_pattern | default(web_static_root ~ '/{env}_' ~ a.name)) | replace('{env}', a.env) }};
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~* \.(?:js|css|woff2?|png|jpg|jpeg|gif|svg|ico)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
}
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user