CIA/e-voting-system/docker-compose.dev.yml
E-Voting Developer 8baabf528c feat: Implement Historique and Upcoming Votes pages with styling and data fetching
- Added HistoriquePage component to display user's voting history with detailed statistics and vote cards.
- Created UpcomingVotesPage component to show upcoming elections with a similar layout.
- Developed CSS styles for both pages to enhance visual appeal and responsiveness.
- Integrated API calls to fetch user's votes and upcoming elections.
- Added a rebuild script for Docker environment setup and data restoration.
- Created a Python script to populate the database with sample data for testing.
2025-11-06 05:12:03 +01:00

74 lines
1.8 KiB
YAML

version: '3.8'
services:
mariadb:
image: mariadb:latest
container_name: evoting_db
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpass123}
MYSQL_DATABASE: ${DB_NAME:-evoting_db}
MYSQL_USER: ${DB_USER:-evoting_user}
MYSQL_PASSWORD: ${DB_PASSWORD:-evoting_pass123}
ports:
- "${DB_PORT:-3306}:3306"
volumes:
- evoting_data:/var/lib/mysql
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- evoting_network
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "--silent"]
timeout: 20s
retries: 10
start_period: 30s
backend:
build:
context: .
dockerfile: docker/Dockerfile.backend
container_name: evoting_backend
environment:
DB_HOST: mariadb
DB_PORT: 3306
DB_NAME: ${DB_NAME:-evoting_db}
DB_USER: ${DB_USER:-evoting_user}
DB_PASSWORD: ${DB_PASSWORD:-evoting_pass123}
SECRET_KEY: ${SECRET_KEY:-your-secret-key-change-in-production}
DEBUG: ${DEBUG:-false}
ports:
- "${BACKEND_PORT:-8000}:8000"
depends_on:
mariadb:
condition: service_healthy
volumes:
- ./backend:/app/backend
networks:
- evoting_network
command: uvicorn backend.main:app --host 0.0.0.0 --port 8000 --reload
frontend:
build:
context: .
dockerfile: docker/Dockerfile.frontend.dev
args:
REACT_APP_API_URL: http://backend:8000
container_name: evoting_frontend
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
- backend
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
networks:
- evoting_network
stdin_open: true
tty: true
volumes:
evoting_data:
networks:
evoting_network:
driver: bridge