Browse Source

Updating naming convention in preperation for docker push

Matthew Faltys 1 year ago
parent
commit
797a914c20
5 changed files with 19 additions and 12 deletions
  1. 4 2
      Makefile
  2. 3 4
      deps/Dockerfile
  3. 10 4
      deps/Dockerfile.web
  4. 1 1
      deps/config.ovpn
  5. 1 1
      deps/run.sh

+ 4 - 2
Makefile

@@ -2,6 +2,7 @@ IMAGE_NAME=unixvoid/seedpod
2 2
 WEB_THEME=https://github.com/Secretmapper/combustion/archive/v0.6.2.tar.gz
3 3
 ALPINE_FS=https://cryo.unixvoid.com/bin/filesystem/alpine/linux-latest-amd64.rootfs.tar.gz
4 4
 OS_PERMS=sudo
5
+ROOT_DIR:=$(shell pwd)
5 6
 
6 7
 
7 8
 all: 
@@ -27,7 +28,7 @@ aci_build: pull_actool
27 28
 	cp deps/config.ovpn seedpod-layout/rootfs/
28 29
 	cp deps/creds.x seedpod-layout/rootfs/
29 30
 	cp deps/settings.json seedpod-layout/rootfs/transmission/
30
-	cp deps/run.sh seedpod-layout/rootfs/
31
+	cp deps/start_server.sh seedpod-layout/rootfs/
31 32
 	cp deps/manifest.json seedpod-layout/manifest
32 33
 	./appc-v0.8.7/actool build seedpod-layout seedpod.aci
33 34
 	./appc-v0.8.7/actool --debug validate seedpod.aci
@@ -44,7 +45,7 @@ aci_build_web: pull_actool
44 45
 	cp deps/creds.x seedpod-layout/rootfs/
45 46
 	cp deps/settings.json seedpod-layout/rootfs/transmission/
46 47
 	cp -R deps/stage.tmp/theme/ seedpod-layout/rootfs/usr/share/transmission/web/
47
-	cp deps/run.sh seedpod-layout/rootfs/
48
+	cp deps/start_server.sh seedpod-layout/rootfs/
48 49
 	cp deps/manifest.json seedpod-layout/manifest
49 50
 	./appc-v0.8.7/actool build seedpod-layout seedpod.aci
50 51
 	./appc-v0.8.7/actool --debug validate seedpod.aci
@@ -76,6 +77,7 @@ docker_run:
76 77
 		--device=/dev/net/tun \
77 78
 		--dns=8.8.8.8 \
78 79
 		-p 9091:9091 \
80
+		-v $(ROOT_DIR)/deps/creds.x:/openvpn/creds.x:ro \
79 81
 		-v ~/Downloads/transmission/downloads:/transmission/downloads:rw \
80 82
 		-v ~/Downloads/transmission/incomplete:/transmission/incomplete:rw \
81 83
 		$(IMAGE_NAME)

+ 3 - 4
deps/Dockerfile

@@ -4,9 +4,8 @@ RUN apk --update add openvpn transmission-daemon
4 4
 RUN mkdir -p /transmission/downloads
5 5
 RUN mkdir -p /transmission/incomplete
6 6
 
7
-COPY config.ovpn /
8
-COPY creds.x /
7
+COPY config.ovpn /openvpn/
9 8
 COPY settings.json /transmission/
10
-COPY run.sh /
9
+COPY start_server.sh /
11 10
 
12
-CMD ["/run.sh"]
11
+CMD ["/start_server.sh"]

+ 10 - 4
deps/Dockerfile.web

@@ -1,13 +1,19 @@
1 1
 FROM alpine
2 2
 
3
+# install openvpn and the transmission-daemon
3 4
 RUN apk --update add openvpn transmission-daemon
5
+# create directories for downloaded files
4 6
 RUN mkdir -p /transmission/downloads
5 7
 RUN mkdir -p /transmission/incomplete
6 8
 
7
-COPY config.ovpn /
8
-COPY creds.x /
9
+# copy in openvpn configs
10
+COPY config.ovpn /openvpn/
9 11
 COPY settings.json /transmission/
12
+
13
+# copy in custom transmission theme
10 14
 COPY stage.tmp/theme/ /usr/share/transmission/web/
11
-COPY run.sh /
12 15
 
13
-CMD ["/run.sh"]
16
+# copy in runscript
17
+COPY start_server.sh /
18
+
19
+CMD ["/start_server.sh"]

+ 1 - 1
deps/config.ovpn

@@ -48,7 +48,7 @@ cipher aes-128-cbc
48 48
 auth sha1
49 49
 tls-client
50 50
 remote-cert-tls server
51
-auth-user-pass creds.x
51
+auth-user-pass /openvpn/creds.x
52 52
 comp-lzo
53 53
 verb 1
54 54
 reneg-sec 0

+ 1 - 1
deps/run.sh

@@ -12,7 +12,7 @@ iptables -I OUTPUT 1 -m owner --uid-owner root -p udp --dport 53 -j ACCEPT
12 12
 iptables -A OUTPUT -m mark ! --mark 0x1 ! -o tun+ -j DROP
13 13
 
14 14
 # start openvpn with killswitch whitelist mark
15
-openvpn --mark 1 --config /config.ovpn &
15
+openvpn --mark 1 --config /openvpn/config.ovpn &
16 16
 
17 17
 # start transmission
18 18
 transmission-daemon --foreground --config-dir /transmission