-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
152 lines (139 loc) · 3.12 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
services:
#============#
# BASE IMAGE #
#============#
base:
build:
context: .
target: core
pull_policy: if_not_present
shm_size: '2gb'
networks:
bh_net:
aliases:
- core
env_file:
- path: ./.env
required: true
- path: ./config/.env
required: false
environment:
- HOST_PWD=${PWD}
- BUGHOG_VERSION=${BUGHOG_VERSION}
volumes:
- ./config:/app/config:ro
- ./browser/binaries/chromium/artisanal:/app/browser/binaries/chromium/artisanal:rw
- ./browser/binaries/firefox/artisanal:/app/browser/binaries/firefox/artisanal:rw
- ./experiments:/app/experiments:rw
- ./browser/extensions:/app/browser/extensions:ro
- ./logs:/app/logs:rw
- ./nginx/ssl/:/etc/nginx/ssl/:rw
- /var/run/docker.sock:/var/run/docker.sock:rw
- /dev/shm:/dev/shm:rw
profiles:
- never_start
#=============#
# DEVELOPMENT #
#=============#
core_dev:
extends: base
hostname: bh_core
ports:
- "5000:5000"
build:
context: .
target: dev
image: bh_core_dev
environment:
- "DEVELOPMENT=1"
- "PYTHONPATH=/app:/root/.local/bin"
- "DISPLAY=:1"
- "MOZ_DISABLE_CONTENT_SANDBOX=1"
- "PATH=${PATH}:/$HOME/.local/bin"
volumes:
- .:/app:rw
container_name: bh_core_dev
profiles:
- dev
#============#
# PRODUCTION #
#============#
core:
extends: base
image: bughog/core:${BUGHOG_VERSION}
hostname: bh_core
container_name: bh_core
init: true
ports:
- "5000:5000"
profiles:
- prod
worker:
extends: base
image: bughog/worker:${BUGHOG_VERSION}
build:
context: .
target: worker
hostname: bh_worker
container_name: bh_worker
profiles:
- prod
#================#
# NGINX #
#================#
nginx:
build:
context: .
target: nginx
container_name: bh_nginx
restart: always
volumes:
- ./nginx/ssl/:/etc/nginx/ssl/:ro
- ./experiments/pages/:/www/data/pages/:ro
- ./experiments/res/:/www/data/res/:ro
- ./logs/:/logs/:rw
- ./logs/:/logs/:rw
ports:
- "80:80"
- "443:443"
networks:
bh_net:
aliases:
- leak.test
- a.test
- sub.a.test
- sub.sub.a.test
- b.test
- adition.com
profiles:
- prod
nginx_dev:
extends: nginx
container_name: bh_nginx_dev
environment:
- "DEVELOPMENT=1"
profiles:
- dev
#================#
# NODE FRONT END #
#================#
node_dev:
build:
context: .
target: ui-build-stage
networks:
bh_net:
aliases:
- node
volumes:
- ./bci/web/vue/public:/app/public:rw
- ./bci/web/vue/src:/app/src:rw
- ./bci/web/vue/postcss.config.js:/app/postcss.config.js:rw
- ./bci/web/vue/tailwind.config.js:/app/tailwind.config.js:rw
- ./bci/web/vue/vite.config.js:/app/vite.config.js:rw
command: ["npm", "run", "dev", "--", "--host"]
profiles:
- dev
networks:
bh_net:
name: bh_net