2017-03-15 08:58:34 +01:00
|
|
|
# docker version 2 example
|
|
|
|
|
|
|
|
version: "2"
|
|
|
|
|
|
|
|
services:
|
|
|
|
tor:
|
2019-08-03 16:33:21 +02:00
|
|
|
image: goldy/tor-hidden-service:$CUR_TAG
|
2017-03-15 08:58:34 +01:00
|
|
|
build: .
|
|
|
|
links:
|
|
|
|
- world
|
|
|
|
environment:
|
2019-05-12 14:43:33 +02:00
|
|
|
# Set service hosts to unix socket
|
|
|
|
WORLD_TOR_SERVICE_HOSTS: 80:unix://var/run/nginx.sock
|
2017-03-15 08:58:34 +01:00
|
|
|
|
|
|
|
# Mount socket directory from world container
|
|
|
|
volumes_from:
|
|
|
|
- world
|
|
|
|
|
|
|
|
# Keep keys in volumes
|
|
|
|
volumes:
|
|
|
|
- tor-keys:/var/lib/tor/hidden_service/
|
|
|
|
|
|
|
|
world:
|
|
|
|
image: tutum/hello-world
|
|
|
|
hostname: world
|
|
|
|
# You can disable network to increase security
|
|
|
|
network_mode: none
|
|
|
|
command: |
|
|
|
|
sh -c 'php-fpm -d variables_order="EGPCS" &&
|
|
|
|
sed -i "s|80|unix:/var/run/nginx.sock|" /etc/nginx/nginx.conf &&
|
|
|
|
exec nginx -g "daemon off;"'
|
|
|
|
volumes:
|
|
|
|
- /var/run
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
tor-keys:
|
|
|
|
driver: local
|