deploy-stack 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -85,7 +85,7 @@ export async function mainStack() {
|
|
|
85
85
|
// 2.7 Set intelligent defaults
|
|
86
86
|
let defaultPort = '3000';
|
|
87
87
|
|
|
88
|
-
if (finalFramework === 'static') defaultPort = '
|
|
88
|
+
if (finalFramework === 'static') defaultPort = '8080';
|
|
89
89
|
if (finalFramework === 'python') defaultPort = '8000';
|
|
90
90
|
|
|
91
91
|
// 3. Prompt Configuration Group
|
package/src/utils/warnings.js
CHANGED
|
@@ -25,7 +25,7 @@ export function getFrameworkWarning(frameworkId) {
|
|
|
25
25
|
return (
|
|
26
26
|
color.bgYellow(color.black(' ⚠️ IMPORTANT: STATIC SITE SETUP REQUIRED ')) +
|
|
27
27
|
color.yellow('\n 1. Open your generated Dockerfile.') +
|
|
28
|
-
color.yellow('\n 2. Ensure the
|
|
28
|
+
color.yellow('\n 2. Ensure the "COPY --from=builder" command matches your framework:') +
|
|
29
29
|
color.yellow('\n Vite / Astro: COPY --from=builder /app/dist /usr/share/nginx/html') +
|
|
30
30
|
color.yellow('\n Create React App: COPY --from=builder /app/build /usr/share/nginx/html') +
|
|
31
31
|
color.yellow('\n 3. Ensure your package.json has a "build" script (e.g., "vite build").\n\n')
|
|
@@ -17,8 +17,17 @@ FROM nginx:alpine
|
|
|
17
17
|
# Vite/Astro = dist | Create React App/Gatsby = build | Next.js Static = out
|
|
18
18
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
RUN
|
|
20
|
+
# Inject custom Nginx configuration for unprivileged ports and SPA routing
|
|
21
|
+
RUN echo "server {" > /etc/nginx/conf.d/default.conf && \
|
|
22
|
+
echo " listen {{PORT}};" >> /etc/nginx/conf.d/default.conf && \
|
|
23
|
+
echo " listen [::]:{{PORT}};" >> /etc/nginx/conf.d/default.conf && \
|
|
24
|
+
echo " server_name localhost;" >> /etc/nginx/conf.d/default.conf && \
|
|
25
|
+
echo " location / {" >> /etc/nginx/conf.d/default.conf && \
|
|
26
|
+
echo " root /usr/share/nginx/html;" >> /etc/nginx/conf.d/default.conf && \
|
|
27
|
+
echo " index index.html index.htm;" >> /etc/nginx/conf.d/default.conf && \
|
|
28
|
+
echo " try_files \$uri \$uri/ /index.html;" >> /etc/nginx/conf.d/default.conf && \
|
|
29
|
+
echo " }" >> /etc/nginx/conf.d/default.conf && \
|
|
30
|
+
echo "}" >> /etc/nginx/conf.d/default.conf
|
|
22
31
|
|
|
23
32
|
# Silence unprivileged user directive warning in main config
|
|
24
33
|
RUN sed -i 's/^user\s\+nginx;/# user nginx;/' /etc/nginx/nginx.conf
|