mirror of
https://github.com/cmehay/docker-tor-hidden-service.git
synced 2025-04-11 17:42:04 +00:00
37 lines
825 B
YAML
37 lines
825 B
YAML
# docker version 2 example
|
|
|
|
version: "2"
|
|
|
|
services:
|
|
tor:
|
|
image: goldy/tor-hidden-service:$CUR_TAG
|
|
build: .
|
|
links:
|
|
- world
|
|
environment:
|
|
# Set service hosts to unix socket
|
|
WORLD_TOR_SERVICE_HOSTS: 80:unix://var/run/nginx.sock
|
|
|
|
# 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
|