/
docker-compose.yml
194 lines (184 loc) · 5.41 KB
/
docker-compose.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
version: "3.8"
services:
bitchan_nginx:
container_name: bitchan_nginx
networks:
bc_net:
ipv4_address: 172.28.1.1
restart: always
build:
context: ../
dockerfile: docker/nginx/Dockerfile
logging:
options:
max-size: 30m
volumes:
- /usr/local/bitchan-docker/bitchan:/usr/local/bitchan
- run_vol:/run
- /etc/localtime:/etc/localtime:ro # Use timezone of the host (read-only)
depends_on:
- bitchan_flask
# ports:
# - "8000:8000"
# See the manual for setting up a tor hidden service to host a kiosk.
bitchan_tor:
container_name: bitchan_tor
networks:
bc_net:
ipv4_address: 172.28.1.2
restart: always
build:
context: ../
dockerfile: docker/tor/Dockerfile
privileged: true
logging:
options:
max-size: 30m
volumes:
- /usr/local/bitchan-docker/tor:/usr/local/tor
- run_vol:/run
command:
bash -c "/tor_setup.sh &&
/usr/local/bin/tor -f /usr/local/tor/torrc"
bitchan_bitmessage:
container_name: bitchan_bitmessage
image: app
pull_policy: never
networks:
bc_net:
ipv4_address: 172.28.1.3
restart: always
volumes:
- /usr/local/bitchan-docker/bitchan:/usr/local/bitchan
- /usr/local/bitchan-docker/bitmessage:/usr/local/bitmessage
- /etc/localtime:/etc/localtime:ro # Use timezone of the host (read-only)
privileged: true
command: >
bash -c "/home/bitchan/docker/bitmessage/bitmessage_setup.sh &&
/home/bitchan/database/upgrade_database_docker.sh &&
/usr/local/bin/pybitmessage -d"
depends_on:
- bitchan_mysql
- bitchan_tor
bitchan_flask:
container_name: bitchan_flask
image: app
pull_policy: never
networks:
bc_net:
ipv4_address: 172.28.1.4
restart: always
build:
context: ../
dockerfile: docker/Dockerfile
working_dir: /home/bitchan
volumes:
- /usr/local/bitchan-docker/bitchan:/usr/local/bitchan
- /usr/local/bitchan-docker/bitmessage:/usr/local/bitmessage
- /usr/local/bitchan-docker/gnupg:/usr/local/gnupg
- /usr/local/bitchan-docker/tor:/usr/local/tor
- /usr/local/bitchan-docker/i2p_qb:/i2p_qb
- flask_session:/home/bitchan/flask_session
- var_lock:/var/lock
- run_vol:/run
- /var/run/docker.sock:/var/run/docker.sock:ro # For BitChan to control docker containers
- /etc/localtime:/etc/localtime:ro # Use timezone of the host (read-only)
privileged: true
command: python3 -m gunicorn --workers 1 --worker-class gthread --threads 4 --timeout 1800 --bind unix:/run/bitchan.sock bitchan_flask:app
depends_on:
- bitchan_bitmessage
- bitchan_mysql
bitchan_daemon:
container_name: bitchan_daemon
image: app
pull_policy: never
networks:
bc_net:
ipv4_address: 172.28.1.5
restart: always
working_dir: /home/bitchan
volumes:
- /usr/local/bitchan-docker/bitchan:/usr/local/bitchan
- /usr/local/bitchan-docker/bitmessage:/usr/local/bitmessage
- /usr/local/bitchan-docker/gnupg:/usr/local/gnupg
- /usr/local/bitchan-docker/tor:/usr/local/tor
- /usr/local/bitchan-docker/i2p_qb:/i2p_qb
- var_lock:/var/lock
- /var/run/docker.sock:/var/run/docker.sock:ro # For BitChan to control docker containers
- /etc/localtime:/etc/localtime:ro # Use timezone of the host (read-only)
privileged: true
command: bash -c "sleep 10 && PYTHONPATH=/home/bitchan python3 bitchan_daemon.py"
depends_on:
- bitchan_bitmessage
- bitchan_mysql
# See the manual for setting up an i2p hidden service to host a kiosk.
bitchan_i2p:
container_name: bitchan_i2p
networks:
bc_net:
ipv4_address: 172.28.1.6
restart: always
build:
context: ../
dockerfile: docker/i2pd/Dockerfile
logging:
options:
max-size: 30m
ports:
- "7070:7070" # Access to the webconsole is at http://publicIP:7070
# If public, it's recommended to change the user/password in i2pd.conf
volumes:
- /usr/local/bitchan-docker/i2pd:/home/i2pd/data
privileged: true
bitchan_qbittorrent:
container_name: bitchan_qbittorrent
networks:
bc_net:
ipv4_address: 172.28.1.8
cap_add:
- NET_ADMIN
build:
context: ../
dockerfile: docker/qbittorrent/Dockerfile
restart: always
logging:
options:
max-size: 30m
ports:
- "8080:8080" # qBittorrent Web-UI Port
# If not accessing from localhost, use "docker logs bitchan_qbittorrent" to get admin password
volumes:
- /usr/local/bitchan-docker/i2p_qb:/i2p_qb
depends_on:
- bitchan_i2p
bitchan_mysql:
container_name: bitchan_mysql
image: mysql:8.3.0
networks:
bc_net:
ipv4_address: 172.28.1.7
restart: always
environment:
MYSQL_DATABASE: 'bitchan_db'
MYSQL_ROOT_PASSWORD: Bitchandbpw
logging:
options:
max-size: 30m
volumes:
- /usr/local/bitchan-docker/bitchan:/usr/local/bitchan
- /usr/local/bitchan-docker/mysql:/var/lib/mysql
command:
--sort_buffer_size=1000000
volumes:
run_vol:
driver_opts:
type: tmpfs
device: tmpfs
flask_session:
var_lock:
networks:
bc_net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16