Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more tournament server deployment documentation #1848

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tournament/scripts/deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
In these scripts, `lightsail` has been set up as a host alias
in `/etc/hosts` for the AWS Lightsail instance.

Additional configuraion (`.pem` file and remote username)
is specified in `~/.ssh/config`.
9 changes: 9 additions & 0 deletions tournament/scripts/deploy/nginx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Place in:
```
/etc/nginx/sites-available/
```
or in
```
/opt/bitnami/nginx/conf/server_blocks/
```
if using bitnami.
18 changes: 18 additions & 0 deletions tournament/scripts/deploy/nginx/swarm-server-block.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
server {
listen 80;
listen [::]:80;

listen 443 ssl;
listen [::]:443 ssl;

ssl_certificate /opt/bitnami/nginx/conf/swarmgame.net.crt;
ssl_certificate_key /opt/bitnami/nginx/conf/swarmgame.net.key;

server_name swarmgame.net;

location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass "http://127.0.0.1:5500";
}
}
4 changes: 4 additions & 0 deletions tournament/scripts/deploy/systemd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Place `swarm-tournament.service` in:
```
/etc/systemd/system/swarm-tournament.service
```
3 changes: 3 additions & 0 deletions tournament/scripts/deploy/systemd/run-webserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash -xe

./tournament-bin --version $(cat git-hash.txt) --port 5500
14 changes: 14 additions & 0 deletions tournament/scripts/deploy/systemd/swarm-tournament.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Swarm tournament host
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=5
User=bitnami
WorkingDirectory=/home/bitnami
ExecStart=/usr/bin/env ./run-webserver.sh

[Install]
WantedBy=multi-user.target