File size: 784 Bytes
fcc9de2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM ubuntu:22.04

# Install required packages
RUN apt-get update && apt-get install -y \
    openvpn \
    iptables \
    python3 \
    python3-pip \
    curl \
    wget \
    net-tools \
    && rm -rf /var/lib/apt/lists/*

# Install Python dependencies
RUN pip3 install gradio requests

# Create necessary directories
RUN mkdir -p /etc/openvpn/server
RUN mkdir -p /app

# Copy application files
COPY app.py /app/
COPY setup_vpn.sh /app/
COPY server.conf /etc/openvpn/server/

# Make scripts executable
RUN chmod +x /app/setup_vpn.sh

# Create OpenVPN keys directory
RUN mkdir -p /etc/openvpn/easy-rsa
RUN mkdir -p /etc/openvpn/server/keys

# Set working directory
WORKDIR /app

# Expose port 7860 (Hugging Face default)
EXPOSE 7860

# Start the application
CMD ["python3", "app.py"]