-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenvpn.yml
56 lines (53 loc) · 1.62 KB
/
openvpn.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Docker-compose mis à disposition par Kevin Allioli
# Date de mise à jour : 16/03/2021
# Variables d'environnement à déclarer :
# - SERVICE : nom du service (exemple : pgadmin)
# - PUID : uid de l'utilisateur système (exemple : 1001)
# - GUID : gid du groupe système (exemple : 1001)
# - INTERFACE: nom de l'interface réseau
# - TZ : Timezone du service (exemple : Europe/Paris)
# - DATA_LOCATION : localisation des données (exemple /apps/"service")
# - NDD : nom de domaine de l'application
# - NETWORK_FRONT : nom du réseau frontal
# Fonctionne avec Portainer
version: "2"
services:
openvpn-as:
image: linuxserver/openvpn-as
container_name: $SERVICE
cap_add:
- NET_ADMIN
environment:
- PUID=$PUID
- PGID=$PGID
- TZ=$TZ
- INTERFACE=$INTERFACE
healthcheck:
test: curl --fail --insecure https://localhost:943 || exit 1
interval: 1m
timeout: 30s
retries: 3
logging:
driver: loki
options:
loki-url: "$URL_LOKI"
loki-external-labels: service={{.Name}}
volumes:
- $DATA_LOCATION:/config
ports:
- 9443:9443
- 1194:1194/udp
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.$SERVICE.entrypoints=https"
- "traefik.http.routers.$SERVICE.rule=Host(`$NDD`)"
- "traefik.http.services.$SERVICE.loadbalancer.server.port=943"
- "traefik.http.services.$SERVICE.loadbalancer.server.scheme=https"
- "traefik.docker.network=$NETWORK_APP"
networks:
- default
networks:
default:
external:
name: $NETWORK_APP