-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Cyber-Mint/00-deploy-improvements
00 deploy improvements
- Loading branch information
Showing
19 changed files
with
215 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
fastapi==0.99.1 | ||
jinja2==3.1.2 | ||
pydantic==1.10.11 | ||
fastapi==0.109.2 | ||
Jinja2==3.1.3 | ||
pydantic==2.6.1 | ||
pydantic-settings==2.1.0 | ||
requests==2.31.0 | ||
typing_extensions==4.7.1 | ||
urllib3==2.0.3 | ||
uvicorn==0.22.0 | ||
typing_extensions==4.9.0 | ||
urllib3==2.2.0 | ||
uvicorn==0.27.0.post1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>VPN Server</title> | ||
<link rel="stylesheet" href="../static/styles.css" /> | ||
<link rel="icon" type="image/x-icon" href="../static/favicon.ico"> | ||
</head> | ||
<body> | ||
<div class="error-wrapper"> | ||
<div class="error"> | ||
The token you provided was incorrect! Try again. | ||
<span class="hide-error">×</span> | ||
</div> | ||
</div> | ||
<div id="app"> | ||
<div class="main"> | ||
<div class="title-generate-wrapper"> | ||
<img src="../static/images/wg-logo.jpeg" alt="wg-logo" /> | ||
<div class="title-generate-block"> | ||
<div class="title-block"> | ||
<div class="title">WireGuard-VPN</div> | ||
<div class="title-description"> | ||
A no-nonsense self-provisioning VPN server for dev teams | ||
</div> | ||
<div > | ||
<h1>Page not found</h1> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="copyright"> | ||
<div class="github"> | ||
<img src="../static/images/github.png" alt="github" /> | ||
<a | ||
class="github-link" | ||
href="https://github.com/cyber-mint/wg-vpn" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
https://github.com/cyber-mint/wg-vpn | ||
</a> | ||
</div> | ||
<div class="cyber-mint"> | ||
Copyright © 2023, Cyber-Mint (Pty) Ltd, Provided under MIT | ||
License | ||
<img src="../static/images/cm-logo-whitespace.png" alt="cyber-mint" /> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,22 @@ | ||
--- | ||
- name: Copy over Backend Docker-compose file | ||
become: true | ||
ansible.builtin.copy: | ||
src: docker-compose/docker-compose.yml | ||
dest: /home/docker-compose.yml | ||
owner: root | ||
group: root | ||
mode: '0644' | ||
|
||
- name: Generate wireguard server token | ||
- name: Generate wireguard server token, and read into var | ||
ansible.builtin.shell: | ||
cmd: set -o pipefail && tr -dc A-Za-z0-9 </dev/urandom | head -c 25; echo '' | ||
executable: /bin/bash | ||
register: vpn_registration_token | ||
changed_when: true | ||
|
||
- name: Write WG_VPN_REGISTRATION_TOKEN to docker-compose | ||
become: true | ||
ansible.builtin.replace: | ||
path: /home/docker-compose.yml | ||
regexp: ^( - WG_VPN_REGISTRATION_TOKEN=).* | ||
replace: \g<1>{{ vpn_registration_token.stdout }} | ||
|
||
- name: Write WG_VPN_ENDPOINT to docker-compose | ||
become: true | ||
ansible.builtin.replace: | ||
path: /home/docker-compose.yml | ||
regexp: ^( - WG_VPN_ENDPOINT=).* | ||
replace: \g<1>{{ vpn_endpoint }} | ||
|
||
- name: Write WG_VPN_ALLOWED_IPS to docker-compose | ||
become: true | ||
ansible.builtin.replace: | ||
path: /home/docker-compose.yml | ||
regexp: ^( - WG_VPN_ALLOWED_IPS=).* | ||
replace: \g<1>{{ vpn_allowed_ips }} | ||
|
||
- name: Read remote Public key into var | ||
become: true | ||
ansible.builtin.slurp: | ||
src: /etc/wireguard/public.key | ||
register: public_key | ||
|
||
- name: Write WG_VPN_SERVER_PUBLIC_KEY to docker-compose | ||
become: true | ||
ansible.builtin.replace: | ||
path: /home/docker-compose.yml | ||
regexp: ^( - WG_VPN_SERVER_PUBLIC_KEY=).* | ||
replace: \g<1>{{ public_key['content'] | b64decode }} | ||
|
||
- name: Write WG_VPN_SERVER_HOST to docker-compose | ||
become: true | ||
ansible.builtin.replace: | ||
path: /home/docker-compose.yml | ||
regexp: ^( - WG_VPN_SERVER_HOST=).* | ||
replace: \g<1>{{ vpn_server_host }} | ||
|
||
- name: Write WG_VPN_VERSION to docker-compose | ||
- name: Copy over Backend Docker-compose file | ||
become: true | ||
ansible.builtin.replace: | ||
path: /home/docker-compose.yml | ||
regexp: 'WG_VPN_VERSION' | ||
replace: '{{ vpn_version }}' | ||
ansible.builtin.template: | ||
src: templates/docker-compose.yml.j2 | ||
dest: /home/docker-compose.yml | ||
owner: root | ||
group: root | ||
mode: '0644' |
Oops, something went wrong.