Skip to content

Buid & Run with Docker

Ricardo Campos edited this page Sep 28, 2024 · 2 revisions

Build steps

Here's how you can build both server and client.

docker build -t client ./client
docker build -t server ./server

Run steps

Take these steps to run from the Docker image.

DB

Postgres DB

docker run -d --rm \
  --name db \
  --network=host \
  -e POSTGRES_DB=tasknote \
  -e POSTGRES_USER=tasknoteuser \
  -e POSTGRES_PASSWORD=default \
  -e PGDATA=/tmp \
  -v ./data:/tmp \
  postgres:15.8-bookworm

Server

Java Server REST API

docker run -d --rm \
  --name server \
  --network=host \
  -e POSTGRES_DB=tasknote \
  -e POSTGRES_USER=tasknoteuser \
  -e POSTGRES_PASSWORD=default \
  -e POSTGRES_PORT=5432 \
  -e POSTGRES_HOST=localhost \
  -e CORS_ALLOWED_ORIGINS=http://localhost:5000 \
  server

Client

The Web App frontend client

docker run -d -p 80:5000 --rm \
  --name client \
  -e VITE_BUILD=client:nightly \
  -e VITE_BACKEND_SERVER=http://localhost:8585 \
  client
Clone this wiki locally