Merge pull request #31 from cmehay/typo
Fix typo, add test for v2 secret key in env, fix docker build scriptspull/67/head
commit
ed1050fc91
@ -0,0 +1,54 @@
|
||||
# docker version 3 example
|
||||
|
||||
version: "3.1"
|
||||
|
||||
services:
|
||||
tor:
|
||||
image: goldy/tor-hidden-service:latest
|
||||
links:
|
||||
- hello
|
||||
- world
|
||||
- again
|
||||
environment:
|
||||
# Set version 3 on BAR group
|
||||
BAR_TOR_SERVICE_HOSTS: '80:hello:80,88:world:80'
|
||||
BAR_TOR_SERVICE_VERSION: '3'
|
||||
|
||||
# hello and again will share the same v2 onion_adress
|
||||
FOO_TOR_SERVICE_HOSTS: '88:again:80,80:hello:80,800:hello:80,8888:hello:80'
|
||||
|
||||
|
||||
# Keep keys in volumes
|
||||
volumes:
|
||||
- tor-keys:/var/lib/tor/hidden_service/
|
||||
|
||||
# Set secret for key, use the same name as the service
|
||||
secrets:
|
||||
- source: foo
|
||||
target: foo
|
||||
mode: 0400
|
||||
- source: bar
|
||||
target: bar
|
||||
mode: 0400
|
||||
|
||||
hello:
|
||||
image: tutum/hello-world
|
||||
hostname: hello
|
||||
|
||||
world:
|
||||
image: tutum/hello-world
|
||||
hostname: world
|
||||
|
||||
again:
|
||||
image: tutum/hello-world
|
||||
hostname: again
|
||||
|
||||
volumes:
|
||||
tor-keys:
|
||||
driver: local
|
||||
|
||||
secrets:
|
||||
foo:
|
||||
file: ./private_key_foo_v2
|
||||
bar:
|
||||
file: ./private_key_bar_v3
|
@ -1,3 +1,5 @@
|
||||
#!/bin/bash
|
||||
v1="${SOURCE_BRANCH%-*}"
|
||||
tor_version=${v1:1}
|
||||
|
||||
docker build --build-arg tor_version=${SOURCE_BRANCH:1} -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
||||
docker build --build-arg tor_version=${tor_version} -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker tag $IMAGE_NAME ${repoName}:latest
|
||||
docker push ${repoName}:latest
|
||||
docker tag $IMAGE_NAME ${DOCKER_REPO}:latest
|
||||
docker push ${DOCKER_REPO}:latest
|
||||
|
Loading…
Reference in New Issue