forked from hugsy/ctfhub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (76 loc) · 1.79 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
version: '3'
services:
postgres:
image: postgres:alpine
env_file:
- .env
environment:
- POSTGRES_DB=${CTFHUB_DB_NAME}
- POSTGRES_USER=${CTFHUB_DB_USER}
- POSTGRES_PASSWORD=${CTFHUB_DB_PASSWORD}
volumes:
- postgres-vol:/var/lib/postgresql/data
networks:
- ctfhub
restart: always
hedgedoc:
image: quay.io/hedgedoc/hedgedoc:alpine
links:
- "postgres:db"
env_file:
- .env
environment:
- CMD_DB_URL=postgres://${CTFHUB_DB_USER}:${CTFHUB_DB_PASSWORD}@${CTFHUB_DB_HOST}:${CTFHUB_DB_PORT}/${CTFHUB_DB_NAME}
- CMD_ALLOW_ANONYMOUS=false
- CMD_ALLOW_FREEURL=true
- CMD_IMAGE_UPLOAD_TYPE=filesystem
- CMD_DOMAIN=${CTFHUB_HEDGEDOC_DOMAIN}
- CMD_PORT=${CTFHUB_HEDGEDOC_PORT}
- CMD_URL_ADDPORT=true
- CMD_PROTOCOL_USESSL=${CTFHUB_HEDGEDOC_USESSL}
- CMD_REQUIRE_FREEURL_AUTHENTICATION=true
networks:
- ctfhub
ports:
- 3000:3000
restart: always
depends_on:
- postgres
volumes:
- type: volume
source: hedgedoc-vol
target: /hedgedoc/public/uploads
read_only: false
ctfhub:
# build: https://github.com/hugsy/ctfhub.git#master
build: .
command: python manage.py runserver 0.0.0.0:8000
links:
- "postgres:db"
env_file:
- .env
# - .env.proxy # Uncomment if using a proxy
depends_on:
- postgres
- hedgedoc
ports:
- 8000:8000
networks:
- ctfhub
restart: always
volumes:
- type: volume
source: ctfhub-vol
target: /code/uploads
read_only: false
- type: bind
source: ./
target: /code
read_only: false
networks:
ctfhub:
driver: bridge
volumes:
postgres-vol:
hedgedoc-vol:
ctfhub-vol: