Skip to content

Commit 29b6b28

Browse files
Merge pull request #108 from FSU-ACM/release
deployment updates
2 parents 29b467a + 97b3894 commit 29b6b28

File tree

8 files changed

+50
-147
lines changed

8 files changed

+50
-147
lines changed
File renamed without changes.
+46-34
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,55 @@
1-
upstream contestsuite_django {
2-
server django:8000;
1+
upstream gunicorn {
2+
server gunicorn:8000;
33
}
4-
upstream contestsuite_flower {
5-
server celery_flower:5555;
4+
upstream flower {
5+
server celery_flower:5555;
66
}
77

88
server {
9-
listen 80;
10-
server_name contest.cs.fsu.edu;
9+
listen 80;
10+
server_name contest.cs.fsu.edu;
1111

12-
location / {
13-
proxy_pass http://contestsuite_django;
14-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12+
location = /robots.txt {
13+
return 200 "User-agent: *\nDisallow: /flower/\n";
14+
}
15+
16+
location / {
17+
add_header Cache-Control "no-cache, no-store";
18+
19+
proxy_pass http://gunicorn;
20+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21+
proxy_set_header Host $host;
22+
proxy_redirect off;
23+
}
24+
25+
location /static {
26+
expires 1M;
27+
add_header Cache-Control "public, no-transform";
28+
29+
alias /usr/share/nginx/html/static/django;
30+
sendfile on;
31+
tcp_nopush on;
32+
}
33+
34+
location /flower {
35+
add_header Cache-Control "no-cache, no-store";
36+
add_header X-Robots-Tag "noindex" always;
37+
38+
proxy_pass http://flower;
1539
proxy_set_header Host $host;
16-
proxy_redirect off;
17-
}
18-
19-
location /static {
20-
aio on;
21-
autoindex off;
22-
alias /usr/share/nginx/html/static/django;
23-
sendfile on;
24-
}
25-
26-
location /flower {
27-
proxy_pass http://contestsuite_flower;
28-
proxy_set_header Host $host;
29-
proxy_http_version 1.1;
30-
proxy_set_header Upgrade $http_upgrade;
31-
proxy_set_header Connection "upgrade";
32-
proxy_redirect off;
33-
add_header X-Robots-Tag "noindex" always;
40+
proxy_http_version 1.1;
41+
proxy_set_header Upgrade $http_upgrade;
42+
proxy_set_header Connection "upgrade";
43+
proxy_redirect off;
3444
}
3545

36-
location /flower/static {
37-
aio on;
38-
autoindex off;
39-
alias /usr/share/nginx/html/static/flower;
40-
sendfile on;
41-
add_header X-Robots-Tag "noindex" always;
42-
}
46+
location /flower/static {
47+
expires 6M;
48+
add_header Cache-Control "public, no-transform";
49+
add_header X-Robots-Tag "noindex" always;
50+
51+
alias /usr/share/nginx/html/static/flower;
52+
sendfile on;
53+
tcp_nopush on;
54+
}
4355
}

deploy/prod/contestsuite/docker-swarm.yaml deploy/prod/contestsuite/docker-stack.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
delay: 5s
3030
monitor: 60s
3131
failure_action: rollback
32-
django:
32+
gunicorn:
3333
image: acmfsu/contestsuite:latest
3434
command: /app/docker/start.sh server
3535
secrets:
@@ -261,6 +261,7 @@ services:
261261
failure_action: rollback
262262
redis:
263263
image: redis:5-buster
264+
command: redis-server --save 600 1 --loglevel warning
264265
environment:
265266
TZ: America/New_York
266267
volumes:
File renamed without changes.

deploy/prod/judgehosts/docker-compose.yaml deploy/prod/judgehosts/docker-compose.yml

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ services:
1212
JUDGEDAEMON_USERNAME: judgehost
1313
JUDGEDAEMON_PASSWORD_FILE: /run/secrets/domjudge_jh_password
1414
DOMSERVER_BASEURL: http://domserver/
15-
DOMJUDGE_CREATE_WRITABLE_TEMP_DIR: 1
1615
volumes:
1716
- /sys/fs/cgroup:/sys/fs/cgroup:ro
1817
networks:
@@ -28,7 +27,6 @@ services:
2827
JUDGEDAEMON_USERNAME: judgehost
2928
JUDGEDAEMON_PASSWORD_FILE: /run/secrets/bastion_jh_password
3029
DOMSERVER_BASEURL: http://domserver/
31-
DOMJUDGE_CREATE_WRITABLE_TEMP_DIR: 1
3230
volumes:
3331
- /sys/fs/cgroup:/sys/fs/cgroup:ro
3432
networks:

deploy/prod/judgehosts/docker-compose_swarm.yaml

-106
This file was deleted.

src/core/templates/core/base.html

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@
110110
target="_blank" rel="external noopener"><i class="fa-solid fa-file-circle-question fa-fw"></i> Example Questions</a>
111111
<a class="dropdown-item" href="https://drive.google.com/drive/folders/1uCylEYyFdXdxD_BxplYZIioW6_ragXTq?usp=sharing"
112112
target="_blank" rel="external noopener"><i class="fa-solid fa-book fa-fw"></i> Registration Guide</a>
113+
<a class="dropdown-item" href="https://www.domjudge.org/docs/team-manual.pdf"
114+
target="_blank" rel="external noopener"><i class="fa-solid fa-book fa-fw"></i> Team Manual</a>
113115
<a class="dropdown-item" href="https://bit.ly/JoinProgClub" target="_blank" rel="external noopener"><i class="fa-solid fa-people-group fa-fw"></i> Programming Club</a>
114116
</div>
115117
</li>

src/core/templates/core/index.html

-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
{% load cache %}
33
{% load static %}
44

5-
{% block head %}
6-
<link rel="stylesheet" type="text/css" href="{% static 'core/css/index.css' %}"/>
7-
{% endblock %}
8-
95
{% block title %}
106
<title>ACM at FSU Programming Contest</title>
117
{% endblock %}

0 commit comments

Comments
 (0)