Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Add nginx configuration for web routes (spa mode) (#319)

Hakan Shehua04cae9add54
diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile
index 506b8db9..d1c714b1 100644
--- a/apps/web/Dockerfile
+++ b/apps/web/Dockerfile
@@ -42,6 +42,19 @@ FROM nginx:1.27-alpine
COPY --from=build /app/apps/web/dist /usr/share/nginx/html
+RUN cat <<'EOF' > /etc/nginx/conf.d/default.conf
+server {
+ listen 80;
+ server_name _;
+ root /usr/share/nginx/html;
+ index index.html;
+
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+}
+EOF
+
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]