1 Star 0 Fork 7

lyrhy/openvpn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yaml 4.20 KB
一键复制 编辑 原始数据 按行查看 历史
周小龙 提交于 2024-07-28 14:20 . nginx镜像切换到阿里云
version: '2'
services:
openvpn:
container_name: openvpn
image: registry.cn-hangzhou.aliyuncs.com/metahubs/yskj:openvpn
volumes:
- ./run:/etc/openvpn
- ./mainapp:/usr/local/openvpn
environment:
TZ: "Asia/Shanghai"
APIKEY: "0123456789123456"
cap_add:
- NET_ADMIN
restart: always
hostname: openvpn
depends_on:
- "vpnapi"
privileged: true
#command: /bin/sh -c "while sleep 1000; do :; done"
command: /bin/sh -c "/etc/openvpn/start.sh"
ports:
- "20005:20005"
vpnapi:
container_name: vpnapi
image: registry.cn-hangzhou.aliyuncs.com/metahubs/yskj:vpnapi
volumes:
- /:/rootfs:ro
- ./vpnapi/config:/usr/bin/config
- ./vpnapi/sso:/usr/bin/sso
environment:
NUX_ROOTFS: "/rootfs"
TZ: "Asia/Shanghai"
restart: always
hostname: vpnapi
depends_on:
- "vpnmysql"
- "vpnopenldap"
- "vpnprometheus"
vpnui:
container_name: vpnui
hostname: vpnui
environment:
- TZ=Asia/Shanghai
image: registry.cn-hangzhou.aliyuncs.com/metahubs/yskj:nginx1.18
volumes:
- ./vpnui/nginx.conf:/etc/nginx/nginx.conf
- ./vpnui/conf.d:/etc/nginx/conf.d/
- ./vpnui/dist:/dist
- ./vpnui/log:/var/log/nginx/
restart: always
depends_on:
- "vpnapi"
ports:
- 9998:80
vpnmysql:
image: registry.cn-hangzhou.aliyuncs.com/metahubs/yskj:mysql5.7
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/my.cnf:/etc/mysql/my.cnf
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
hostname: vpnmysql
container_name: vpnmysql
environment:
MYSQL_ROOT_PASSWORD: 123456
TZ: Asia/Shanghai
secure_file_priv:
vpnopenldap:
image: registry.cn-hangzhou.aliyuncs.com/metahubs/yskj:openldap
container_name: vpnopenldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "Example Inc."
LDAP_DOMAIN: "example.org"
LDAP_BASE_DN: ""
LDAP_ADMIN_PASSWORD: "admin"
LDAP_CONFIG_PASSWORD: "config"
LDAP_READONLY_USER: "false"
#LDAP_READONLY_USER_USERNAME: "readonly"
#LDAP_READONLY_USER_PASSWORD: "readonly"
LDAP_RFC2307BIS_SCHEMA: "false"
LDAP_BACKEND: "mdb"
LDAP_TLS: "true"
LDAP_TLS_CRT_FILENAME: "ldap.crt"
LDAP_TLS_KEY_FILENAME: "ldap.key"
LDAP_TLS_DH_PARAM_FILENAME: "dhparam.pem"
LDAP_TLS_CA_CRT_FILENAME: "ca.crt"
LDAP_TLS_ENFORCE: "false"
LDAP_TLS_CIPHER_SUITE: "SECURE256:-VERS-SSL3.0"
LDAP_TLS_VERIFY_CLIENT: "demand"
LDAP_REPLICATION: "false"
#LDAP_REPLICATION_CONFIG_SYNCPROV: 'binddn="cn=admin,cn=config" bindmethod=simple credentials="$$LDAP_CONFIG_PASSWORD" searchbase="cn=config" type=refreshAndPersist retry="60 +" timeout=1 starttls=critical'
#LDAP_REPLICATION_DB_SYNCPROV: 'binddn="cn=admin,$$LDAP_BASE_DN" bindmethod=simple credentials="$$LDAP_ADMIN_PASSWORD" searchbase="$$LDAP_BASE_DN" type=refreshAndPersist interval=00:00:00:10 retry="60 +" timeout=1 starttls=critical'
#LDAP_REPLICATION_HOSTS: "#PYTHON2BASH:['ldap://ldap.example.org','ldap://ldap2.example.org']"
KEEP_EXISTING_CONFIG: "false"
LDAP_REMOVE_CONFIG_AFTER_SETUP: "true"
LDAP_SSL_HELPER_PREFIX: "ldap"
tty: true
stdin_open: true
volumes:
- ./openldap/data/schema:/etc/ldap/schema
- ./openldap/data/ldap:/var/lib/ldap
- ./openldap/data/slapd.d:/etc/ldap/slapd.d
- ./openldap/data/certs:/container/service/slapd/assets/certs/
domainname: "example.org"
hostname: "ldap-server"
restart: always
vpnprometheus:
image: registry.cn-hangzhou.aliyuncs.com/metahubs/yskj:prometheus
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
command: "--web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/prometheus"
hostname: prometheus
restart: always
# ports:
#- "9092:9090"
# vpnphpldapadmin:
# image: osixia/phpldapadmin:latest
# container_name: vpnphpldapadmin
# hostname: vpnphpldapadmin
# environment:
# PHPLDAPADMIN_LDAP_HOSTS: "vpnopenldap"
# PHPLDAPADMIN_HTTPS: "false"
# ports:
# - "9009:80"
# depends_on:
# - vpnopenldap
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/lyrhy/openvpn.git
git@gitee.com:lyrhy/openvpn.git
lyrhy
openvpn
openvpn
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385