forked from Enrise/DevelopmentProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
executable file
·36 lines (32 loc) · 1.17 KB
/
start.sh
File metadata and controls
executable file
·36 lines (32 loc) · 1.17 KB
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
#!/usr/bin/env sh
# ================================================
# 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:v3.6 \
--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.")