-
Notifications
You must be signed in to change notification settings - Fork 2
/
start.sh
executable file
·37 lines (33 loc) · 1.19 KB
/
start.sh
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
#!/usr/bin/env sh
# ================================================
# Enrise development proxy
# find out more: https://enri.se/development-proxy
# ================================================
if ($(docker ps | grep -q development-proxy)); then
echo "Development hosts proxy is already running."
exit 0
fi
mkdir -p ~/.development-proxy/config || true
mkdir -p ~/.development-proxy/certs || true
echo "Starting development proxy..."
docker network create development-proxy > /dev/null 2>&1 || true
(docker run \
--detach \
--rm \
--publish 80:80 \
--publish 443:443 \
--publish 10081:10081 \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--volume ~/.development-proxy/config:/var/config:ro \
--volume ~/.development-proxy/certs:/var/certs:ro \
--name development-proxy \
--network development-proxy \
traefik:v2.10 \
--api.insecure=true \
--providers.docker=true \
--providers.docker.exposedbydefault=false \
--providers.file.directory=/var/config \
--providers.file.watch=true \
--entrypoints.web.address=:80 \
--entrypoints.web-secure.address=:443 \
--entrypoints.traefik.address=:10081 > /dev/null && echo "Started.")