diff --git a/nixpacks.toml b/nixpacks.toml index 6917e14..26e55b1 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -3,3 +3,10 @@ cmds = ["bun install --frozen-lockfile"] [phases.build] cmds = ["bunx vite build"] + +[phases.start] +cmds = [ + "cp -r dist/* /usr/share/nginx/html", + "cat <<'EOF' > /etc/nginx/conf.d/default.conf\nserver {\n listen 80;\n server_name _;\n\n root /usr/share/nginx/html;\n index index.html;\n\n location / {\n try_files $uri $uri/ /index.html;\n }\n}\nEOF", + "nginx -g 'daemon off;'" +] \ No newline at end of file