-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (44 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
44 lines (44 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
services:
tor:
container_name: tor_service
# Run the Dockerfile on the root directory
build: ./
# Run with networking permissions (for fail2ban with iptables)
cap_add:
- NET_ADMIN
# Bind host ports to container ports
ports:
- "${PORT_HOST_NGINX:-8080}:${PORT_CONT_NGINX:-80}"
- "${PORT_HOST_SSH:-4242}:${PORT_CONT_SSH:-4242}"
# Always restart the container unless it is stopped manually
restart: unless-stopped
# Load environment variables from .env file
env_file:
- .env
# Declare environment variables to get warnings if they are
# missing from the .env file
environment:
SSH_USER: ${SSH_USER}
SSH_PWD: ${SSH_PWD}
PORT_HOST_NGINX: ${PORT_HOST_NGINX}
PORT_CONT_NGINX: ${PORT_CONT_NGINX}
PORT_HOST_SSH: ${PORT_HOST_SSH}
PORT_CONT_SSH: ${PORT_CONT_SSH}
# A single value that sets a memory limit for the Docker container,
# analogous to its `docker run` counterpart.
#
# Do `docker ps -s` to check the actual size of the container
mem_limit: 512m # MB
# Mount paths as volumes, optionally specifying a path on the host machine
# (HOST:CONTAINER), or an access mode (HOST:CONTAINER:ro):
# Read-Only (ro) / Read-Write (rw)
# These do not all need to be bound in the production stage.
volumes:
- ./html/slate:/var/www/slate:rw
# - ./config/nginx.conf:/etc/nginx/nginx.conf:ro
# - ./config/ssh/sshd_config:/etc/ssh/sshd_config:ro
- ./config/ssh/authorized_keys:/home/${SSH_USER}/.ssh/authorized_keys:rw
# - ./config/torrc:/etc/tor/torrc:ro
# - ./config/jail.conf:/etc/fail2ban/jail.conf:ro
- ./logs/auth.log:/var/log/auth.log:rw
- ./logs/fail2ban.log:/var/log/fail2ban.log:rw