Added deployment
This commit is contained in:
parent
055b367b23
commit
9ec9dbf085
3 changed files with 39 additions and 0 deletions
6
docker/Caddyfile
Normal file
6
docker/Caddyfile
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
:80 {
|
||||||
|
root * /var/www/html
|
||||||
|
file_server
|
||||||
|
|
||||||
|
try_files {path} /index.html
|
||||||
|
}
|
||||||
21
docker/Dockerfile
Normal file
21
docker/Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
FROM node:21.6 AS build-stage
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY node_modules/ node_modules/
|
||||||
|
COPY src/ src/
|
||||||
|
COPY public/ public/
|
||||||
|
COPY babel.config.js ./
|
||||||
|
COPY jsconfig.json ./
|
||||||
|
COPY vue.config.js ./
|
||||||
|
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
|
FROM caddy:2.8 AS production-stage
|
||||||
|
|
||||||
|
COPY --from=build-stage /app/dist /var/www/html
|
||||||
12
docker/docker-compose.yml
Normal file
12
docker/docker-compose.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
name: volleyball-site
|
||||||
|
|
||||||
|
services:
|
||||||
|
vue-app:
|
||||||
|
build:
|
||||||
|
context: ../
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
ports:
|
||||||
|
- "7000:80"
|
||||||
|
volumes:
|
||||||
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||||
|
restart: unless-stopped
|
||||||
Loading…
Reference in a new issue