mirror of
https://github.com/MarcZierle/photo-log-frontend.git
synced 2025-04-12 07:04:36 +00:00
fix nginx routing
This commit is contained in:
parent
0fb0eb8516
commit
26f5e4a431
@ -27,7 +27,11 @@ RUN npm run build
|
|||||||
|
|
||||||
FROM nginx:1.23.2-alpine AS runner
|
FROM nginx:1.23.2-alpine AS runner
|
||||||
|
|
||||||
|
# setup nginx
|
||||||
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
RUN addgroup -S www && adduser -S www -G www
|
RUN addgroup -S www && adduser -S www -G www
|
||||||
|
|
||||||
# copy build files
|
# copy build files
|
||||||
COPY --from=builder /home/app/dist /usr/share/nginx/html
|
COPY --from=builder /home/app/dist /home/www/dist
|
||||||
|
RUN chown -R www:www /home/www/dist
|
||||||
|
8
nginx.conf
Normal file
8
nginx.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /home/www/dist;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user