UnschooledGamer commited on
Commit
32f0b98
·
verified ·
1 Parent(s): 8733447

test dockerfile with nginx

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -2
Dockerfile CHANGED
@@ -6,7 +6,8 @@ RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  libpthread-stubs0-dev \
8
  curl \
9
- libopus-dev
 
10
 
11
  # Set the working directory inside the container
12
  WORKDIR /app
@@ -51,4 +52,20 @@ RUN mv example.app.yml app.yml
51
 
52
  RUN sed -i 's/port: 3000/port: 7860/g' app.yml
53
 
54
- CMD ["./luvit", "dev"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  build-essential \
7
  libpthread-stubs0-dev \
8
  curl \
9
+ libopus-dev \
10
+ nginx
11
 
12
  # Set the working directory inside the container
13
  WORKDIR /app
 
52
 
53
  RUN sed -i 's/port: 3000/port: 7860/g' app.yml
54
 
55
+ # Generate nginx config
56
+ RUN echo "server { \
57
+ listen 80; \
58
+ location / { \
59
+ return 200; \
60
+ } \
61
+ location /v1 { \
62
+ proxy_pass http://localhost:7860; \
63
+ proxy_http_version 1.1; \
64
+ proxy_set_header Upgrade \$http_upgrade; \
65
+ proxy_set_header Connection 'upgrade'; \
66
+ proxy_set_header Host \$host; \
67
+ proxy_cache_bypass \$http_upgrade; \
68
+ } \
69
+ }" > /etc/nginx/sites-available/default
70
+
71
+ CMD ["nginx", "-g", "daemon off;"]