Skip to content
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
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/node_modules
/Dockerfile
/docker-compose.yml
/dist
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM node:24-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" ]
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,47 @@ Run with the `--watch` flag (`npm test -- --watch`) to run in interactive watch

This project is tested with [BrowserStack](https://www.browserstack.com/).

## Running with Docker Compose

To run the VIA web application using `docker compose`, follow these steps:

1. **Prerequisites**
- [Docker](https://docs.docker.com/get-docker/) installed
- [Docker Compose](https://docs.docker.com/compose/install/) installed

2. **Start the application**
```bash
docker compose up
```

3. **Access the application**
Open your browser and navigate to [http://localhost:5173](http://localhost:5173)

4. **Stop the application**
```bash
docker compose down
```

### Docker Compose Configuration

The Docker Compose setup includes:
- Node.js 24 Alpine base image
- Vite development server with host binding
- Port mapping for local development (localhost:5173)
- Automatic restart policy (`unless-stopped`)
- Optimized build process for development environment

### Building from Source

If you need to rebuild the container after making changes:
```bash
docker compose build --no-cache
docker compose up
```

This approach ensures a consistent environment and eliminates dependency issues
during local development.

## Looking for an offline app?

@cebby2420 has kindly made a desktop app that does so.
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Run `docker-compose up` to build and run the via app in docker
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: []