Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use docker for building/running the via app #209

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules
/Dockerfile
/docker-compose.yml
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:23-alpine

RUN apk update

RUN apk upgrade

RUN apk add jq xdg-utils

WORKDIR /app

COPY . .

RUN sed -i -e 's/vite --force/vite --force --host/' package.json

RUN npm install

RUN npm run build:azure || true

EXPOSE 5173

CMD [ "npm", "run", "dev" ]
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Run `docker-compose up` to build and run the via app in docker
version: '3.9'
services:
via:
build:
context: .
pull: true
dockerfile: Dockerfile
tags:
- via
restart: unless-stopped
stdin_open: true
tty: true
ports:
- "127.0.0.1:5173:5173"
depends_on: []