add vpn container
This commit is contained in:
parent
219e28b420
commit
d0ab7b44ba
2
.gitignore
vendored
2
.gitignore
vendored
@ -162,3 +162,5 @@ cython_debug/
|
|||||||
|
|
||||||
# a directories where i experiment with random shit (lol)
|
# a directories where i experiment with random shit (lol)
|
||||||
sandbox/
|
sandbox/
|
||||||
|
|
||||||
|
config.ovpn
|
||||||
|
9
Dockerfile.vpn
Normal file
9
Dockerfile.vpn
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
RUN apk add --no-cache openvpn bash iptables curl
|
||||||
|
|
||||||
|
RUN mkdir -p /etc/openvpn
|
||||||
|
|
||||||
|
COPY ./config.ovpn /etc/openvpn/config.ovpn
|
||||||
|
|
||||||
|
CMD ["openvpn", "--config", "/etc/openvpn/config.ovpn"]
|
@ -1,13 +1,40 @@
|
|||||||
services:
|
services:
|
||||||
|
vpn:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.vpn
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
devices:
|
||||||
|
- /dev/net/tun
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./config.ovpn:/etc/openvpn/config.ovpn
|
||||||
|
networks:
|
||||||
|
- vpn_net
|
||||||
|
dns:
|
||||||
|
- 1.1.1.1
|
||||||
|
- 8.8.8.8
|
||||||
|
|
||||||
owlrandomshitbot:
|
owlrandomshitbot:
|
||||||
image: owlrandomshitbot
|
image: owlrandomshitbot
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.tgbot
|
dockerfile: Dockerfile.tgbot
|
||||||
env_file: ".env"
|
env_file: ".env"
|
||||||
|
network_mode: "service:vpn"
|
||||||
|
depends_on:
|
||||||
|
- vpn
|
||||||
|
|
||||||
booru-api:
|
booru-api:
|
||||||
image: booru-api
|
image: booru-api
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.booru-api
|
dockerfile: Dockerfile.booru-api
|
||||||
|
network_mode: "service:vpn"
|
||||||
|
depends_on:
|
||||||
|
- vpn
|
||||||
|
|
||||||
|
networks:
|
||||||
|
vpn_net:
|
||||||
|
driver: bridge
|
||||||
|
Loading…
x
Reference in New Issue
Block a user