DEBUG
Browse files- App/app.py +1 -0
- Dockerfile +5 -3
App/app.py
CHANGED
|
@@ -43,6 +43,7 @@ async def connect_to_vpn():
|
|
| 43 |
"--config",
|
| 44 |
f"{os.path.dirname(__file__)}/Mikrotik/utils/client1-working.ovpn",
|
| 45 |
]
|
|
|
|
| 46 |
process = subprocess.Popen(command)
|
| 47 |
await asyncio.sleep(5) # Wait for a few seconds to ensure the VPN connects
|
| 48 |
logging.info("VPN connected successfully.")
|
|
|
|
| 43 |
"--config",
|
| 44 |
f"{os.path.dirname(__file__)}/Mikrotik/utils/client1-working.ovpn",
|
| 45 |
]
|
| 46 |
+
print(f"{os.path.dirname(__file__)}/Mikrotik/utils/client1-working.ovpn")
|
| 47 |
process = subprocess.Popen(command)
|
| 48 |
await asyncio.sleep(5) # Wait for a few seconds to ensure the VPN connects
|
| 49 |
logging.info("VPN connected successfully.")
|
Dockerfile
CHANGED
|
@@ -1,18 +1,20 @@
|
|
| 1 |
# Use an official Python image as a base
|
| 2 |
FROM python:3.10-slim
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Copy the application files to the container
|
| 8 |
-
COPY
|
| 9 |
-
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 12 |
pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
|
| 15 |
-
|
|
|
|
| 16 |
# Expose the port the app runs on
|
| 17 |
EXPOSE 7860
|
| 18 |
|
|
|
|
| 1 |
# Use an official Python image as a base
|
| 2 |
FROM python:3.10-slim
|
| 3 |
+
RUN apt update && apt install -y openvpn
|
| 4 |
+
|
| 5 |
|
| 6 |
# Set the working directory in the container
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
# Copy the application files to the container
|
| 10 |
+
COPY requirements.txt /app/requirements.txt
|
|
|
|
| 11 |
# Install dependencies
|
| 12 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 13 |
pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
|
| 16 |
+
COPY . /app
|
| 17 |
+
|
| 18 |
# Expose the port the app runs on
|
| 19 |
EXPOSE 7860
|
| 20 |
|