fix: Files moved, docs updated and server updated:

* Moved files around for better consistency
* Simplified docker file for use
* Added a  arg to the server/setup.py script for more flexibility
* Improved the current docker build and compose for the fully patched pritunl.
This commit is contained in:
Amir Moradi
2023-05-23 11:13:50 +01:00
parent c01a7d9c98
commit de5076c218
12 changed files with 329 additions and 98 deletions

View File

@@ -0,0 +1,36 @@
# API Only: Docker
## Only installs the API (webserver) and not the Pritunl VPN itself.
This approach runs this API, either on port 80 or behind Traefik, either on docker swarm or single daemon.
You need to have docker up and running on your server.
- In your server, clone this repo, then `cd` to the cloned folder.
- Copy the docker-compose file provided in `<repo_root>/docker/api-only/docker-compose.yml` to
the root of the cloned folder.
You shall now have: `<repo_root>/docker-compose.yml`
- Modify the `<repo_root>/docker-compose.yml` to fit your needs and config
_Watch for volumes, docker swarm or single daemon, behind Traefik or not and the HOST value if behind traefik:_
In case you run behind Traefik, you need to setup the traefik router HOST
You need correctly setup traefik and docker network (here called proxy_external)
**(!) Make sure the mount volumes match correctly.**
* The first volume is the path to the www folder from the root of this repo.
The path shall be a full path, or be next to this docker-compose.yml file.
No parent folder navigation like `../../../` is allowed by docker.
* The second volume is the path to the nginx server config file.
This needs the commited nginx server config (or your own adapted version) to work properly.
See the file `<repo_root>/docker/api-only/conf.d/pritunl-fake-api.conf` for more details.
- Run the updated `docker-compose.yml` file in daemon mode with:
`docker-compose up -d`

View File

@@ -0,0 +1,28 @@
# Fully Patched Pritunl: Using Docker
## Only installs the API (webserver) and not the Pritunl VPN itself.
You need to have docker up and running on your server.
This uses the docker image for Pritunl by `goofball222/pritunl` and installs the fake api hooks directly into it.
Step:
- In your server, clone this repo, then `cd` to the cloned folder.
- Go to the `docker` folder of the repo.
- Read the `<repo_root>/docker/docker-compose.yml` file carefully and edit to fit your needs (ports, volumes, network, server domain...)
- Run the `docker-compose.yml` file in daemon mode with:
`docker-compose up -d`
- This will `docker build` the patched pritunl container and run it on the following ports:
- Under this port the Pritunl web interface will be exposed (for reverse proxies)
*9700:9700*
- The following are the two default ports for the tcp+udp servers (you may edit these as needed!)
*1194:1194*
*1194:1194/udp*