tester1hf commited on
Commit
759dfb9
·
verified ·
1 Parent(s): 4b5e10c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -11
Dockerfile CHANGED
@@ -11,18 +11,21 @@ RUN curl -Lo /usr/local/bin/hysteria https://github.com/HyNetwork/hysteria/relea
11
  # Create a directory for Hysteria configuration
12
  RUN mkdir -p /etc/hysteria
13
 
14
- # Create the Hysteria configuration file directly in the Dockerfile using a heredoc
15
- RUN cat <<EOF > /etc/hysteria/config.json
16
- {
17
- "listen": ":7860",
18
- "insecure": true,
19
- "up_mbps": 100,
20
- "down_mbps": 100
21
- }
22
- EOF
 
 
23
 
24
- # Expose the required port for Hugging Face Spaces
25
- EXPOSE 7860
 
26
 
27
  # Start Hysteria
28
  CMD ["/usr/local/bin/hysteria", "-c", "/etc/hysteria/config.json", "server"]
 
11
  # Create a directory for Hysteria configuration
12
  RUN mkdir -p /etc/hysteria
13
 
14
+ # Create the Hysteria configuration file directly in the Dockerfile
15
+ RUN echo '{' > /etc/hysteria/config.json && \
16
+ echo ' "listen": ":7860",' >> /etc/hysteria/config.json && \
17
+ echo ' "acme": {' >> /etc/hysteria/config.json && \
18
+ echo ' "domains": ["fake-domain.com"],' >> /etc/hysteria/config.json && \
19
+ echo ' "email": "fake-email@example.com",' >> /etc/hysteria/config.json && \
20
+ echo ' "disable_tls_verification": true' >> /etc/hysteria/config.json && \
21
+ echo ' },' >> /etc/hysteria/config.json && \
22
+ echo ' "up_mbps": 100,' >> /etc/hysteria/config.json && \
23
+ echo ' "down_mbps": 100' >> /etc/hysteria/config.json && \
24
+ echo '}' >> /etc/hysteria/config.json
25
 
26
+ # Expose the required ports for ACME (HTTP and HTTPS)
27
+ EXPOSE 80
28
+ EXPOSE 443
29
 
30
  # Start Hysteria
31
  CMD ["/usr/local/bin/hysteria", "-c", "/etc/hysteria/config.json", "server"]