fix environment var

This commit is contained in:
Mickael PAPAMICA Asseline
2023-01-13 15:01:13 +01:00
parent f6a931a88e
commit 916a287e3c
3 changed files with 12 additions and 97 deletions

View File

@@ -1,49 +0,0 @@
# Maintainer: ds - ddsq
# Update: 2023-01-13
#& type: 3
#& title: cf
#& description:
#& note: Website: <a href='ddsd' target='_blank' rel='noopener'>Github.com</a>
#& categories: SelfHosted, PAPAMICA
#& platform: linux
#& logo: fd
#% SERVICE: Name of the service (No spaces or points) [cf]
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
#% URL: Service URL (Example: service.papamica.fr or service.com)
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
# Work with Portainer
version: '3.8'
services:
cf:
image: dd
volumes:
- $DATA_LOCATION/$SERVICE/da:dezafr/fez
environment:
- sdq
- dgre
healthcheck:
test: wget -s 'http://localhost:dd'
interval: 1m
timeout: 30s
retries: 3
container_name: $SERVICE
networks:
- default
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
- "traefik.enable=true"
- "traefik.http.routers.$SERVICE.entrypoints=https"
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
- "traefik.http.services.$SERVICE.loadbalancer.server.port=dd"
networks:
default:
external:
name: $NETWORK

View File

@@ -13,6 +13,16 @@
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
#% URL: Service URL (Example: service.papamica.fr or service.com)
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
{%- if envvar is defined and envvar|length > 0 %}
{%- for var in envvar %}
{%- if not loop.last %}
#% {{ var|upper }}:
{%- endif %}
{%- if loop.last %}
#% {{ var|upper }}:
{%- endif %}
{%- endfor %}
{%- endif %}
# Work with Portainer
version: '3.8'
@@ -34,10 +44,10 @@ services:
environment:
{%- for var in envvar %}
{%- if not loop.last %}
- {{ var }}
- {{ var|upper }}:${{ var|upper }}
{%- endif %}
{%- if loop.last %}
- {{ var }}
- {{ var|upper }}:${{ var|upper }}
{%- endif %}
{%- endfor %}
{%- endif %}

View File

@@ -1,46 +0,0 @@
# Maintainer: sdaq - daz
# Update: 2023-01-13
#& type: 3
#& title: test2
#& description: zad
#& note: Website: <a href='d' target='_blank' rel='noopener'>Github.com</a>
#& categories: SelfHosted, PAPAMICA
#& platform: linux
#& logo: dz
#% SERVICE: Name of the service (No spaces or points) [test2]
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
#% URL: Service URL (Example: service.papamica.fr or service.com)
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
# Work with Portainer
version: '3.8'
services:
test2:
image: dz
volumes:
- $DATA_LOCATION/$SERVICE/fzefz:fezfzef/.fezfzef
environment:
- fa
- zfsf
- qfazf
healthcheck:
test: wget -s 'http://localhost:dz'
interval: 1m
timeout: 30s
retries: 3
container_name: $SERVICE
networks:
- default
labels:
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
- "traefik.enable=true"
- "traefik.http.routers.$SERVICE.entrypoints=https"
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
- "traefik.http.services.$SERVICE.loadbalancer.server.port=dz"
networks:
default:
external:
name: $NETWORK