diff --git a/APP_PROFILER/Dockerfile b/APP_PROFILER/Dockerfile index a2f6600..289ae24 100644 --- a/APP_PROFILER/Dockerfile +++ b/APP_PROFILER/Dockerfile @@ -1,7 +1,8 @@ FROM python:3.12-alpine # Install OpenVPN, OpenRC and other system deps -RUN apk add --no-cache openvpn openrc iproute2 bash iptables +RUN apk add --no-cache openvpn openrc iproute2 bash iptables easy-rsa + WORKDIR /app diff --git a/APP_PROFILER/entrypoint.sh b/APP_PROFILER/entrypoint.sh index 1473004..584bbcf 100644 --- a/APP_PROFILER/entrypoint.sh +++ b/APP_PROFILER/entrypoint.sh @@ -20,7 +20,16 @@ iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu mkdir -p /run/openrc touch /run/openrc/softlevel +# Initialize Easy-RSA if not already present in /app/easy-rsa +if [ ! -d /app/easy-rsa ]; then + echo "[INIT] Initializing Easy-RSA workspace..." + mkdir -p /app/easy-rsa + # Alpine installs easy-rsa files to /usr/share/easy-rsa + ln -s /usr/share/easy-rsa/* /app/easy-rsa/ +fi + # Start the APP_PROFILER API + # We use 0.0.0.0 to be reachable from other containers python main.py diff --git a/docker-compose.yml b/docker-compose.yml index 8d6fe2a..20ac94e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,8 @@ services: - ovp_logs:/var/log/openvpn - ovp_config:/etc/openvpn - db_data:/app/db + - ovp_pki:/app/easy-rsa/pki + networks: - ovp-net @@ -86,4 +88,5 @@ networks: volumes: ovp_logs: ovp_config: + ovp_pki: db_data: