Skip to content

Send and receive SMS messages using your Android phone programmatically via a simple HTTP API

feat(web): add Dockerfile and nginx config for Nuxt 4

Acho Arnoldfa5eaed561cd
diff --git a/web/Dockerfile b/web/Dockerfile
new file mode 100644
index 00000000..f283fd32
--- /dev/null
+++ b/web/Dockerfile
@@ -0,0 +1,24 @@
+# build stage
+FROM node:22-alpine AS build
+
+WORKDIR /app
+
+COPY package.json pnpm-lock.yaml ./
+
+# Install pnpm
+RUN npm install -g pnpm
+
+RUN pnpm install
+
+COPY . .
+RUN pnpm run generate
+
+# production stage
+FROM nginx:stable-alpine AS production
+COPY --from=build /app/.output/public /usr/share/nginx/html
+
+# Copy the nginx configuration file
+COPY ./nginx.conf /etc/nginx/conf.d/default.conf
+
+EXPOSE 3000
+CMD ["nginx", "-g", "daemon off;"]
diff --git a/web/nginx.conf b/web/nginx.conf
new file mode 100644
index 00000000..a66ccfd7
--- /dev/null
+++ b/web/nginx.conf
@@ -0,0 +1,10 @@
+server {
+ listen 3000;
+ server_name localhost;
+ root /usr/share/nginx/html;
+ index index.html index.htm;
+
+ location / {
+ try_files $uri $uri/ /index.html;
+ }
+}