Initial commit: standalone quiz-testing system
Full-stack F# (Domain/Server/Client via Fable+Elmish+Feliz), PostgreSQL persistence via Dapper, Docker Compose deployment. Student quiz-taking flow with time-limit enforcement and focus-loss tracking, Teacher question bank and quiz builder with results analytics, Admin user management.
This commit is contained in:
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: quizsystem
|
||||
POSTGRES_USER: quizsystem
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-devpassword}
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U quizsystem -d quizsystem"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
networks: [quizsystem]
|
||||
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Server/Dockerfile
|
||||
environment:
|
||||
ConnectionStrings__Postgres: "Host=postgres;Port=5432;Database=quizsystem;Username=quizsystem;Password=${POSTGRES_PASSWORD:-devpassword}"
|
||||
Jwt__Secret: ${JWT_SECRET:?Set JWT_SECRET in .env — see .env.example}
|
||||
Client__Origin: "http://localhost:8081"
|
||||
ASPNETCORE_ENVIRONMENT: Production
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
# Mapped to the same host port the client's hardcoded
|
||||
# Client/Shared/JsonWire.fs `serverUrl` already expects — the browser
|
||||
# (not any container) is what resolves "localhost:5144", so this keeps
|
||||
# that working unmodified for local/dev use of the compose stack.
|
||||
ports: ["5144:8080"]
|
||||
networks: [quizsystem]
|
||||
|
||||
client:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: src/Client/Dockerfile
|
||||
ports: ["8081:80"]
|
||||
networks: [quizsystem]
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
networks:
|
||||
quizsystem:
|
||||
Reference in New Issue
Block a user