mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2026-01-14 03:41:19 +00:00
Compare commits
3 Commits
a186290513
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b272bddb7 | |||
| 392a1b0f44 | |||
| 2d2dcff693 |
@@ -36,3 +36,6 @@ STALWART_DOMAIN=
|
|||||||
|
|
||||||
############# Textarea #############
|
############# Textarea #############
|
||||||
TEXTAREA_DOMAIN=
|
TEXTAREA_DOMAIN=
|
||||||
|
|
||||||
|
############# Gopkg Proxy #############
|
||||||
|
GOPKG_PROXY_DOMAIN=
|
||||||
|
|||||||
@@ -139,4 +139,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
############## gopkg-proxy ##############
|
||||||
|
{$GOPKG_PROXY_DOMAIN} {
|
||||||
|
request_body {
|
||||||
|
max_size 2MB
|
||||||
|
}
|
||||||
|
|
||||||
|
reverse_proxy http://gopkg_proxy:8421
|
||||||
|
}
|
||||||
|
|
||||||
import Caddyfile.private
|
import Caddyfile.private
|
||||||
|
|||||||
@@ -67,9 +67,7 @@
|
|||||||
markets:
|
markets:
|
||||||
- symbol: BTC-USD
|
- symbol: BTC-USD
|
||||||
name: Bitcoin
|
name: Bitcoin
|
||||||
- symbol: DYDX-USD
|
|
||||||
name: DYDX
|
|
||||||
- symbol: FET-USD
|
|
||||||
name: FET
|
|
||||||
- symbol: SUI20947-USD
|
- symbol: SUI20947-USD
|
||||||
name: SUI
|
name: SUI
|
||||||
|
- symbol: ASTER36341-USD
|
||||||
|
name: ASTER
|
||||||
|
|||||||
15
gopkg_proxy/docker-compose.yaml
Normal file
15
gopkg_proxy/docker-compose.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
networks:
|
||||||
|
caddy:
|
||||||
|
name: caddy
|
||||||
|
driver: bridge
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
gopkg-proxy:
|
||||||
|
image: aykhans/gopkg-proxy:latest
|
||||||
|
container_name: gopkg_proxy
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
|
networks:
|
||||||
|
- caddy
|
||||||
21
main.sh
21
main.sh
@@ -65,9 +65,6 @@ generate_env_files() {
|
|||||||
cp --update=none ./uptime_kuma/.env.example ./uptime_kuma/.env
|
cp --update=none ./uptime_kuma/.env.example ./uptime_kuma/.env
|
||||||
cp --update=none ./croc/.env.example ./croc/.env
|
cp --update=none ./croc/.env.example ./croc/.env
|
||||||
cp --update=none ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
|
cp --update=none ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
|
||||||
# cp --update=none ./slash/.env.example ./slash/.env
|
|
||||||
# cp --update=none ./grafana/.env.example ./grafana/.env
|
|
||||||
# cp --update=none ./prometheus/.env.example ./prometheus/.env
|
|
||||||
print_success ".env files generated."
|
print_success ".env files generated."
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,6 +225,15 @@ start_services() {
|
|||||||
print_error "failed to start Stalwart!"
|
print_error "failed to start Stalwart!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Starting gopkg proxy..."
|
||||||
|
$DOCKER_COMPOSE_COMMAND -f ./gopkg_proxy/docker-compose.yaml up --pull -d
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
print_success "Gopkg proxy started successfully."
|
||||||
|
else
|
||||||
|
print_error "failed to start Gopkg proxy!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_services() {
|
stop_services() {
|
||||||
@@ -383,6 +389,15 @@ stop_services() {
|
|||||||
print_error "failed to stop Stalwart!"
|
print_error "failed to stop Stalwart!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Stopping gopkg proxy..."
|
||||||
|
$DOCKER_COMPOSE_COMMAND -f ./gopkg_proxy/docker-compose.yaml down
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
print_success "Gopkg proxy stopped successfully."
|
||||||
|
else
|
||||||
|
print_error "failed to stop Gopkg proxy!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user