mirror of
https://github.com/maciejpedzich/racemash.git
synced 2024-11-27 16:15:47 +01:00
Replace nginx with caddy
This commit is contained in:
parent
9ba99adead
commit
24c2d336bb
13
Caddyfile
Normal file
13
Caddyfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
auto_https off
|
||||||
|
servers {
|
||||||
|
trusted_proxies static private_ranges
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
http://racemash.maciejpedzi.ch {
|
||||||
|
root * /srv
|
||||||
|
encode gzip
|
||||||
|
try_files {path} /index.html
|
||||||
|
file_server
|
||||||
|
}
|
@ -4,8 +4,7 @@ COPY . .
|
|||||||
RUN npm i
|
RUN npm i
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM nginx:stable-alpine AS runtime
|
FROM caddy:2.8 AS runtime
|
||||||
COPY --from=build /app/nginx/default.conf /etc/nginx/conf.d/default.conf
|
COPY --from=build /app/Caddyfile /etc/caddy/Caddyfile
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /srv
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name racemash.maciejpedzi.ch;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
|
|
||||||
location /images {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user