-
Notifications
You must be signed in to change notification settings - Fork 0
Buid & Run with Docker
Ricardo Campos edited this page Sep 28, 2024
·
2 revisions
Here's how you can build both server and client.
docker build -t client ./client
docker build -t server ./server
Take these steps to run from the Docker image.
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
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
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