-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
71 lines (62 loc) · 2.73 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
networks:
schoco:
name: schoco
services:
schoco-backend:
image: phitux/schoco-backend:<tag> # use the newest tag, see https://hub.docker.com/r/phitux/schoco-backend/tags
container_name: schoco-backend
restart: always
user: "1000:1000" # find out the user-id (uid) and group-id (gid) of the new user schoco by running 'id schoco' in your bash
group_add:
# find your docker group ID. Either run in your bash: export DOCKER_GROUP_ID=$(getent group docker | cut -d: -f3)
# and import it as variable, or just run the command from within the brackets and replace ${DOCKER_GROUP_ID} with the output.
# Important: the group ID must be used as String (in quotes)!
- ${DOCKER_GROUP_ID}
environment:
- FULL_DATA_PATH=/path/to/my/data
# same as (left part of) first volume - but here as FULL PATH!!!
- MAX_CONTAINERS=4
# sets the amount of java-workers (you want to set this higher!) I recommend as rule of thumb 1.5x the amout of cores of your CPU
- SECRET_KEY=secret
# used for session token
- TEACHER_KEY=teacherkey
# this is the 'password' that is used to create new teacher-accounts. It must only be known to the teachers.
- GITEA_USERNAME=schoco
# this is the username of the gitea-user (see last image in this yaml-file)
- GITEA_PASSWORD=schoco1234
# and that is the password of the gitea-user.
# Actually both username and password can stay like this, if you use the gitea-image from this yaml-file and if gitea is not made public (default)!
- GITEA_HOST=http://schoco-gitea:3000
# stays like this, if you use the gitea-image from this yaml-file and if gitea is not made public (default)!
# change it to your domain, if you use a public gitea-instance
networks:
- schoco
volumes:
- ./data:/app/data
- /var/run/docker.sock:/var/run/docker.sock
schoco-frontend:
image: phitux/schoco-frontend:<tag> # always use the same tag as schoco-backend (see https://hub.docker.com/r/phitux/schoco-frontend/tags)
container_name: schoco-frontend
restart: always
group_add:
- ${DOCKER_GROUP_ID} # see above
networks:
- schoco
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "80:8080" # adapt the left host-port to your needs
schoco-gitea:
image: gitea/gitea:1.17.3 # you could probably use a newer version, but API-changes might break something...
container_name: schoco-gitea
restart: always
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__security__INSTALL_LOCK=true
networks:
- schoco
volumes:
- ./gitea-data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro