Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
federicobarera2 committed Jul 18, 2022
1 parent d014c23 commit 65510fd
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 35 deletions.
71 changes: 38 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,60 @@
<div align="center">

![logo](https://github.com/treyyoder/quakejs-docker/blob/master/quakejs-docker.png?raw=true)
# quakejs-docker
![logo](https://github.com/federicobarera/quakejs-docker/blob/master/quakejs-docker.png?raw=true)
# quakejs-docker

![Docker Image CI](https://github.com/treyyoder/quakejs-docker/workflows/Docker%20Image%20CI/badge.svg)
</div>
:warning: 4/22/2020 Fixed a bug that was preventing other maps from loading. Pull the lastest image from Docker Hub.
![Docker Image CI](https://github.com/federicobarera/quakejs-docker/workflows/Docker%20Image%20CI/badge.svg)

:warning: 4/20/2020 Issues with entrypoint permissions and the refresh loop have been addressed. Pull the lastest image from Docker Hub.
</div>

### A fully local and Dockerized quakejs server. Independent, unadulterated, and free from the middleman.
## Usage

The goal of this project was to create a fully independent quakejs server in Docker that does not require content to be served from the internet.
Hence, once pulled, this does not need to connect to any external provider, ie. content.quakejs.com. Nor does this server need to be proxied/served/relayed from quakejs.com
### Standalone or internal network

#### Simply pull the image [treyyoder/quakejs](https://hub.docker.com/r/treyyoder/quakejs)
```
docker pull treyyoder/quakejs:latest
docker run -d --name quakejs -e HTTP_PORT=8080 -p 8080:80 -p 27960:27960 federicobarera2/quakejs:latest
```
#### and run it:

```
docker run -d --name quakejs -e HTTP_PORT=<HTTP_PORT> -p <HTTP_PORT>:80 -p 27960:27960 treyyoder/quakejs:latest
```
Navigate to http://localhost:8080 or network ip

### Fargate

#### Example:
Perform aws cli login

```
docker run -d --name quakejs -e HTTP_PORT=8080 -p 8080:80 -p 27960:27960 treyyoder/quakejs:latest
npm i
sh ./deploy.sh [--profile]
```

Send all you friends/coworkers the link: ex. http://localhost:8080 and start fragging ;)
After the deploy the `retrieve_ip.sh` script will retrive the public ip of the fargate task

**cdk.json configuration**

| name | desc |
| ---------------- | --------------------------------------------------------------------- |
| whiteListedIps | array of ips allowed to connect |
| usePrebuildImage | leave blank to build from local repository (eg, change in server.cfg) |
| useCapacity | FARGATE or FARGATE_SPOT |
| cpu | CPU requested for fargate task |
| memory | memory requested for fargate task |

## server.cfg:

#### server.cfg:
Refer to [quake3world](https://www.quake3world.com/q3guide/servers.html) for instructions on its usage.

#### docker-compose.yml
```
version: '2'
services:
quakejs:
container_name: quakejs
environment:
- HTTP_PORT=8080
ports:
- '8080:80'
- '27960:27960'
image: 'treyyoder/quakejs:latest'
```
## Changelog

### 17/07/2022

- Dockerfile modified to make build work again
- `echo "127.0.0.1 content.quakejs.com" >> /etc/hosts` moved to the `./entrypoint.sh` as
- Not working anymore during build: https://stackoverflow.com/questions/38302867/how-to-update-etc-hosts-file-in-docker-image-during-docker-build
- Runtime `add-host` not available in fargate
- Added cdk fargate deployment model
- Deployed new docker image based from `treyyoder` latest with:
- No need for -e `SERVER`
- Manifest and content pulled from within image

## Credits:

Thanks to [begleysm](https://github.com/begleysm) with his [fork](https://github.com/begleysm/quakejs) of [quakejs](https://github.com/inolen/quakejs) to which this was derived, aswell as his thorough [documentation](https://steamforge.net/wiki/index.php/How_to_setup_a_local_QuakeJS_server_under_Debian_9_or_Debian_10)
Thanks to [treyyoder](https://github.com/treyyoder) with his [fork](https://github.com/treyyoder/quakejs-docker) of [quakejs](https://github.com/inolen/quakejs) to which this was derived, aswell as his thorough [documentation](https://steamforge.net/wiki/index.php/How_to_setup_a_local_QuakeJS_server_under_Debian_9_or_Debian_10)
2 changes: 2 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npx cdk deploy $*
sh ./retrieve_ip.sh $*
2 changes: 0 additions & 2 deletions release.sh

This file was deleted.

File renamed without changes.

0 comments on commit 65510fd

Please sign in to comment.