mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2025-06-28 01:07:03 +00:00
Changed docker-compose to use the images from dockerhub.
This commit is contained in:
parent
cd97a65260
commit
2a3b99abe8
4
.env.example
Normal file
4
.env.example
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Configure SERVER_ADDRESS to match the address of the server. If you don't have a DNS name, you can use the IP address.
|
||||||
|
# A missconfigured SERVER_ADDRESS will cause the app to have CSRF errors.
|
||||||
|
SERVER_ADDRESS=my_server_address
|
||||||
|
DEBUG_MODE=False
|
36
build_and_push.sh
Executable file
36
build_and_push.sh
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
IMAGES=(
|
||||||
|
"eduardosilva/wireguard_webadmin:latest"
|
||||||
|
"eduardosilva/wireguard_webadmin_cron:latest"
|
||||||
|
"eduardosilva/wireguard_webadmin_nginx:latest"
|
||||||
|
)
|
||||||
|
|
||||||
|
build_images() {
|
||||||
|
echo "Starting the build of the images..."
|
||||||
|
docker-compose -f docker-compose-build.yml build
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "Build completed successfully."
|
||||||
|
else
|
||||||
|
echo "Error during the image build."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
push_images() {
|
||||||
|
for IMAGE in "${IMAGES[@]}"; do
|
||||||
|
echo "Pushing image: $IMAGE..."
|
||||||
|
docker push "$IMAGE"
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo "$IMAGE pushed successfully."
|
||||||
|
else
|
||||||
|
echo "Error pushing the image: $IMAGE"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
build_images
|
||||||
|
push_images
|
||||||
|
|
||||||
|
echo "Build and push operations completed successfully."
|
18
docker-compose-build.yml
Normal file
18
docker-compose-build.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
wireguard-webadmin:
|
||||||
|
image: eduardosilva/wireguard_webadmin:latest
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
|
||||||
|
wireguard-webadmin-cron:
|
||||||
|
image: eduardosilva/wireguard_webadmin_cron:latest
|
||||||
|
build:
|
||||||
|
context: ./cron
|
||||||
|
dockerfile: Dockerfile-cron
|
||||||
|
|
||||||
|
wireguard-webadmin-nginx:
|
||||||
|
image: eduardosilva/wireguard_webadmin_nginx:latest
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile_nginx
|
@ -3,8 +3,7 @@ services:
|
|||||||
wireguard-webadmin:
|
wireguard-webadmin:
|
||||||
container_name: wireguard-webadmin
|
container_name: wireguard-webadmin
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
image: eduardosilva/wireguard_webadmin:latest
|
||||||
context: .
|
|
||||||
environment:
|
environment:
|
||||||
- SERVER_ADDRESS=127.0.0.1
|
- SERVER_ADDRESS=127.0.0.1
|
||||||
- DEBUG_MODE=True
|
- DEBUG_MODE=True
|
||||||
@ -19,7 +18,6 @@ services:
|
|||||||
- "51820-51839:51820-51839/udp"
|
- "51820-51839:51820-51839/udp"
|
||||||
# Ports for port forwarding rules. Add your own ports here if you need them.
|
# Ports for port forwarding rules. Add your own ports here if you need them.
|
||||||
- "8080-8089:8080-8089/tcp"
|
- "8080-8089:8080-8089/tcp"
|
||||||
|
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
- SYS_MODULE
|
- SYS_MODULE
|
||||||
@ -31,12 +29,10 @@ services:
|
|||||||
wireguard-webadmin-cron:
|
wireguard-webadmin-cron:
|
||||||
container_name: wireguard-webadmin-cron
|
container_name: wireguard-webadmin-cron
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
image: eduardosilva/wireguard_webadmin_cron:latest
|
||||||
context: ./cron
|
|
||||||
dockerfile: Dockerfile-cron
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- wireguard-webadmin
|
- wireguard-webadmin
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
static_volume:
|
static_volume:
|
||||||
wireguard:
|
wireguard:
|
||||||
|
@ -3,8 +3,7 @@ services:
|
|||||||
wireguard-webadmin:
|
wireguard-webadmin:
|
||||||
container_name: wireguard-webadmin
|
container_name: wireguard-webadmin
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
image: eduardosilva/wireguard_webadmin:latest
|
||||||
context: .
|
|
||||||
environment:
|
environment:
|
||||||
- SERVER_ADDRESS=${SERVER_ADDRESS}
|
- SERVER_ADDRESS=${SERVER_ADDRESS}
|
||||||
- DEBUG_MODE=${DEBUG_MODE}
|
- DEBUG_MODE=${DEBUG_MODE}
|
||||||
@ -19,7 +18,6 @@ services:
|
|||||||
- "51820-51839:51820-51839/udp"
|
- "51820-51839:51820-51839/udp"
|
||||||
# Ports for port forwarding rules. Add your own ports here if you need them.
|
# Ports for port forwarding rules. Add your own ports here if you need them.
|
||||||
- "8080-8089:8080-8089/tcp"
|
- "8080-8089:8080-8089/tcp"
|
||||||
|
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
- SYS_MODULE
|
- SYS_MODULE
|
||||||
@ -31,19 +29,14 @@ services:
|
|||||||
wireguard-webadmin-cron:
|
wireguard-webadmin-cron:
|
||||||
container_name: wireguard-webadmin-cron
|
container_name: wireguard-webadmin-cron
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
build:
|
image: eduardosilva/wireguard_webadmin_cron:latest
|
||||||
context: ./cron
|
|
||||||
dockerfile: Dockerfile-cron
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- wireguard-webadmin
|
- wireguard-webadmin
|
||||||
|
|
||||||
wireguard-webadmin-nginx:
|
wireguard-webadmin-nginx:
|
||||||
container_name: wireguard-webadmin-nginx
|
container_name: wireguard-webadmin-nginx
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: nginx:alpine
|
image: eduardosilva/wireguard_webadmin_nginx:latest
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile_nginx
|
|
||||||
volumes:
|
volumes:
|
||||||
- static_volume:/static
|
- static_volume:/static
|
||||||
- https_cert:/certificate
|
- https_cert:/certificate
|
||||||
@ -52,6 +45,6 @@ services:
|
|||||||
- "443:443"
|
- "443:443"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
static_volume:
|
static_volume:
|
||||||
https_cert:
|
https_cert:
|
||||||
wireguard:
|
wireguard:
|
||||||
|
@ -129,6 +129,6 @@ STATICFILES_DIRS = [
|
|||||||
|
|
||||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||||
|
|
||||||
WIREGUARD_WEBADMIN_VERSION = 9605
|
WIREGUARD_WEBADMIN_VERSION = 9606
|
||||||
|
|
||||||
from wireguard_webadmin.production_settings import *
|
from wireguard_webadmin.production_settings import *
|
Loading…
x
Reference in New Issue
Block a user