mirror of
https://github.com/garentyler/inferno.git
synced 2025-07-19 11:50:41 -06:00
Add web client dockerfiles
This commit is contained in:
parent
31ed9a08a9
commit
641fccfd60
8
clients/web/dev.Dockerfile
Normal file
8
clients/web/dev.Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM node:23.3.0-alpine3.20
|
||||
WORKDIR /app
|
||||
COPY package.json .
|
||||
ENV PATH=/app/node_modules/.bin:$PATH
|
||||
RUN npm install
|
||||
COPY . .
|
||||
EXPOSE 3000
|
||||
CMD ["npm", "run", "dev", "--", "--host"]
|
10
clients/web/nginx.conf
Normal file
10
clients/web/nginx.conf
Normal file
@ -0,0 +1,10 @@
|
||||
server {
|
||||
listen 3000;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /var/www/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
1292
clients/web/package-lock.json
generated
1292
clients/web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
clients/web/prod.Dockerfile
Normal file
13
clients/web/prod.Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM node:23.3.0-alpine3.20 AS builder
|
||||
WORKDIR /app
|
||||
COPY package.json .
|
||||
RUN npm install
|
||||
ENV PATH=/app/node_modules/.bin:$PATH
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.27.3-alpine3.20
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=builder /app/dist /var/www/html/
|
||||
EXPOSE 3000
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
@ -3,5 +3,10 @@ import vue from '@vitejs/plugin-vue'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
resolve: { alias: { '@': '/src' } },
|
||||
plugins: [vue()],
|
||||
server: {
|
||||
host: true,
|
||||
port: 3000,
|
||||
}
|
||||
})
|
||||
|
@ -1,4 +1,14 @@
|
||||
services:
|
||||
client-web:
|
||||
restart: unless-stopped
|
||||
build:
|
||||
context: ./clients/web/
|
||||
dockerfile: dev.Dockerfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./clients/web:/app
|
||||
- /app/node_modules
|
||||
server:
|
||||
restart: unless-stopped
|
||||
build:
|
||||
|
Loading…
x
Reference in New Issue
Block a user