use lighttpd instead of caddy
Browse files- Caddyfile +0 -4
- Dockerfile +5 -5
- lighttpd.conf +14 -0
Caddyfile
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
:7860
|
2 |
-
root * /srv
|
3 |
-
file_server
|
4 |
-
try_files {path} /index.html
|
|
|
|
|
|
|
|
|
|
Dockerfile
CHANGED
@@ -4,9 +4,9 @@ COPY . /app
|
|
4 |
RUN npm install
|
5 |
RUN npm run build
|
6 |
|
7 |
-
FROM
|
8 |
-
|
9 |
-
COPY --from=builder /app/dist /
|
10 |
-
COPY
|
11 |
EXPOSE 7860
|
12 |
-
|
|
|
4 |
RUN npm install
|
5 |
RUN npm run build
|
6 |
|
7 |
+
FROM jitesoft/lighttpd AS server
|
8 |
+
WORKDIR /var/www/html
|
9 |
+
COPY --from=builder /app/dist /var/www/html
|
10 |
+
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
|
11 |
EXPOSE 7860
|
12 |
+
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
|
lighttpd.conf
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
server.modules = ( "mod_alias", "mod_rewrite" )
|
2 |
+
|
3 |
+
server.document-root = "/var/www/html"
|
4 |
+
server.port = 7860
|
5 |
+
|
6 |
+
# Redirect all requests to index.html
|
7 |
+
url.rewrite-if-not-file = ( ".*" => "/index.html" )
|
8 |
+
|
9 |
+
# Enable compression
|
10 |
+
server.modules += ( "mod_compress" )
|
11 |
+
deflate.mimetypes = ( "text/plain", "text/html", "text/javascript", "text/css", "application/javascript", "application/json" )
|
12 |
+
|
13 |
+
# Set index file
|
14 |
+
index-file.names = ( "index.html" )
|