Dockerize

This commit is contained in:
2025-03-01 11:54:51 -06:00
parent 77f69becf9
commit f85f1ec3f6
7 changed files with 37 additions and 1 deletions

1
.docker-env Normal file
View File

@@ -0,0 +1 @@
VITE_BACKEND_URL=https://api.alttpr.gwaa.kiwi

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
.env

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.env
kube
# Logs
logs

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
FROM node:lts-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
COPY .docker-env .env
RUN npm run build
FROM nginx:stable-alpine AS final
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 8082
CMD ["nginx", "-g", "daemon off;"]

15
nginx.conf Normal file
View File

@@ -0,0 +1,15 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@@ -17,7 +17,6 @@ export default defineComponent({
},
methods: {
uploadSprite(file) {
console.log(file);
if (!file) {
this.sprite_error = null;
this.sprite = null;

View File

@@ -6,6 +6,9 @@ import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
server: {
port: 8082,
},
plugins: [
vue(),
vueDevTools(),