-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
118 lines (113 loc) · 3.33 KB
/
docker-compose.yaml
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
services:
nginx:
image: nginx:latest
volumes:
- ./nginx/configure.sh:/docker-entrypoint.d/99-geproxy-config.sh
- ./nginx/conf.d:/etc/nginx/templates
- ./nginx/ssl:/etc/nginx/ssl
- ./pxe:/var/www/html
ports:
- "${PRIVATE_IP:-10.1.0.1}:80:80"
- "${PRIVATE_IP:-10.1.0.1}:443:443"
depends_on:
devdocs:
condition: service_started
pixie:
condition: service_started
user-data:
condition: service_completed_successfully
environment:
- CCS_HOST=${CCS_HOST:-https://judge.gehack.nl}
- CONTEST_HASH=${CONTEST_HASH:-contest_hash}
- SSL_CERT_LOC=${SSL_CERT_LOC:-}
- SSL_KEY_LOC=${SSL_KEY_LOC:-}
- DOMAIN=${DOMAIN:-progcont}
cap_add:
- NET_ADMIN
acng:
image: sameersbn/apt-cacher-ng:3.3-20200524
volumes:
- ./acng:/var/cache/apt-cacher-ng
restart: always
ports:
- "${PRIVATE_IP:-10.1.0.1}:${ACNG_PORT:-3142}:3142"
pixie:
image: tuupke/pixie
cap_add:
- NET_ADMIN
volumes:
- ./pixie:/geproxy
ports:
- ${PRIVATE_IP:-10.1.0.1}:5353:5353/udp
environment:
- DB_DSN=/geproxy/pixie.sqlite?cache=shared&mode=rwc
- "CUPS_ADDR=${PRIVATE_IP:-10.1.0.1}:631"
- LISTEN_ADDR=127.0.0.1:4000
restart: always
devdocs:
image: geproxy/devdocs
build:
dockerfile: ./Dockerfile
context: ./devdocs
environment:
- LANGUAGES="${LANGUAGES:-'openjdk@17 c cpp python@3.10'}"
dnsmasq:
image: geproxy/dnsmasq
cap_add:
- NET_ADMIN
build:
dockerfile: ./Dockerfile
context: ./dnsmasq
network_mode: host
environment:
- PRIVATE_IP=${PRIVATE_IP:-10.1.0.1}
- PRIVATE_INTERFACE=${PRIVATE_INTERFACE:-lo}
- SUBNET_START=${SUBNET_START:-10.1.0.100}
- SUBNET_END=${SUBNET_END:-10.1.255.255}
- SUBNET_NETMASK=${SUBNET_NETMASK:-255.255.0.0}
- DOMAIN=${DOMAIN:-progcont}
- DNS_RESOLVER=${DNS_RESOLVER:-1.1.1.1}
- STATIC_LEASES=${STATIC_LEASES:-}
volumes:
- ./dnsmasq/dnsmasq.conf.template:/etc/dnsmasq.conf.template
- ./pxe:/pxe
- ./dnsmasq/dnsmasq.leases:/var/lib/misc/dnsmasq.leases
user-data:
image: alpine/curl
volumes:
- ./pxe:/pxe
command:
- /bin/sh
- -c
- |
set -o pipefail &&
cat<<"EOT">/pxe/user-data
#cloud-config
autoinstall:
version: 1
drivers:
install: true
proxy: http://_gateway:3142
kernel:
flavor: hwe
power_state:
mode: reboot
message: Install done, bye bye
identity:
hostname: ${MACHINE_HOSTNAME:-machine}
password: ${MACHINE_PASSWORD:-'$2a$12$6EyKyPDuHQcHIF7Abawva.pCLQhGs0r/3NybeiMVgaKTDPbm.a7b6'}
realname: ${MACHINE_USERNAME:-contestadmin}
username: ${MACHINE_USERNAME:-contestadmin}
storage:
layout:
name: lvm
grub:
reorder_uefi: True
update_nvram: True
reorder_uefi_force_fallback: True
ssh:
allow-pw: false
install-server: true
authorized-keys:
EOT
echo "${GITHUB_USERNAMES:-tuupke}" | tr "," "\n" | (xargs -I{} curl -Sf https://github.com/{}.keys | sed -e 's/^/ - /') >>/pxe/user-data