This guide explains how to run the Vachan-Admin backend (FastAPI + DB + SuperTokens) and frontend (React/Vite + SuperTokens UI) using Docker.
git clone https://github.com/Bridgeconn/vachan-admin.git
cd vachan-adminBoth backend and frontend docker-compose files use the same external network: va-network.
docker network create va-networkIf you get an error like “already exists”, that’s fine — it means the network is already created.
Go to the backend docker folder and update the .env file used by backend services:
cd docker/docker_backendUpdate .env with the following:
# =========================
# SuperTokens DB Config
# =========================
SUPERTOKENS_DB_USER=supertokens_user
SUPERTOKENS_DB_PASSWORD=somePassword
SUPERTOKENS_DB_NAME=supertokens
SUPERTOKENS_DB_CONNECTION_URI=postgresql://${SUPERTOKENS_DB_USER}:${SUPERTOKENS_DB_PASSWORD}@supertokens-db:5432/${SUPERTOKENS_DB_NAME}
# =========================
# SuperTokens App Info (Local)
# =========================
SUPERTOKENS_API_DOMAIN=http://localhost:8000
SUPERTOKENS_WEBSITE_DOMAIN=http://localhost:5174
# Optional: for Swagger / local testing
SUPERTOKENS_ANTI_CSRF=NONE
# =========================
# Cookie settings
# =========================
# NOTE:
# - For local http testing, secure cookies may not work unless you're using https.
# - Keep as-is if your setup expects it.
SUPERTOKENS_COOKIE_SECURE=true
SUPERTOKENS_COOKIE_DOMAIN=api.dev-admin.vachanengine.org
SUPERTOKENS_COOKIE_SAME_SITE=lax
# =========================
# SuperTokens Core Config
# =========================
SUPERTOKENS_CONNECTION_URI=http://supertokens:3567
SUPERTOKENS_API_KEY=your-api-key
# =========================
# Vachan Admin DB Config
# =========================
VACHAN_ADMIN_POSTGRES_HOST=vachan-admin-db
VACHAN_ADMIN_POSTGRES_PORT=5432
VACHAN_ADMIN_POSTGRES_USER=user
VACHAN_ADMIN_POSTGRES_PASSWORD=secret
VACHAN_ADMIN_POSTGRES_DATABASE=db
# =========================
# SMTP Config
# =========================
SMTP_HOST=your-host
SMTP_PORT=your-port
SMTP_NAME=Vachan Admin
SMTP_EMAIL=your-email
SMTP_PASSWORD=your-password
SMTP_SECURE=True
Run docker compose in detached mode:
docker compose up --build -d
Go to the frontend docker folder:
cd ../docker_frontendUpdate the frontend .env with the following:
VITE_FASTAPI_BASE_URL=https://api.dev-admin.vachanengine.org
VITE_SUPERTOKENS_API_DOMAIN=https://api.dev-admin.vachanengine.org
VITE_SUPERTOKENS_WEBSITE_DOMAIN=http://localhost:5174Run docker compose in detached mode:
docker compose up --build -dBackend: http://localhost:8000
Frontend: http://localhost:5174To stop backend:
cd ../docker_backend
docker compose downTo stop frontend:
cd ../docker_frontend
docker compose down