-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.sh
39 lines (28 loc) · 997 Bytes
/
install.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
38
39
#!/bin/bash
# Variables
PROXY_PATH=/cnt/proxy
PWD=$(pwd)
# Create proxy directory
mkdir -p $PROXY_PATH
# Move into proxy directory
cd $PROXY_PATH || { echo "Failed to move into proxy directory"; exit 1; }
# Create .env file
touch .env
echo "DO_AUTH_TOKEN=" >> .env
echo "COMPOSE_PROJECT_NAME=proxy" >> .env
# Create acme.json
touch acme.json
chmod 600 acme.json
# Copy docker-compose
curl https://raw.githubusercontent.com/ethercreative/docker-remote-proxy/main/docker-compose.yml >> docker-compose.yml
# Copy Treafik configs
curl https://raw.githubusercontent.com/ethercreative/docker-remote-proxy/main/traefik.yml >> traefik.yml
curl https://raw.githubusercontent.com/ethercreative/docker-remote-proxy/main/dynamic.yml >> dynamic.yml
# Create logs folder
mkdir logs
# Create the proxy network (if not exists)
docker network ls|grep proxy > /dev/null || docker network create --driver bridge proxy
# Start the proxy
docker compose up -d
# Return to initial directory
cd "$PWD" || exit