Add static assets to nginx

This commit is contained in:
2023-09-18 15:03:44 +02:00
committed by Clément Le Bihan
parent 49a735631a
commit 94658d4379
9 changed files with 73 additions and 10 deletions
+3 -2
View File
@@ -22,6 +22,7 @@ RUN yarn tsc && expo build:web
# Serve the app
FROM nginx:1.21-alpine
COPY --from=build /app/web-build /usr/share/nginx/html
COPY nginx.conf.template /etc/nginx/conf.d/default.conf.template
COPY ./assets/ /usr/share/nginx/html/assets/
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
CMD envsubst '$API_URL $SCOROMETER_URL $NGINX_PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
CMD nginx -g 'daemon off;'