Skip to content

dk2013/Dictionary-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dictionary App

A React-based dictionary application with automated deployment to production.

Features

  • React TypeScript application
  • Automated deployment via GitHub Actions
  • Docker containerization
  • Traefik reverse proxy with SSL
  • Let's Encrypt automatic certificate generation

Production Deployment

The application is automatically deployed to production when changes are pushed to the master branch.

Environment Variables

The following environment variables are required in GitHub Actions:

  • DOMAIN - Your production domain (e.g., fancydictionary.com)
  • EMAIL - Email for Let's Encrypt certificates
  • TRAEFIK_PASSWORD_HASH - Password hash for Traefik dashboard
  • PROJECT_DIR - Server project directory path
  • HOST - Server IP address
  • USERNAME - SSH username
  • PORT - SSH port
  • SSH_KEY - SSH private key

Deployment Process

  1. GitHub Actions runs tests and builds the application
  2. SSH Action deploys to production server
  3. Deploy Script updates configuration and starts containers
  4. Traefik handles SSL termination and routing
  5. Let's Encrypt automatically generates SSL certificates

Access URLs

  • Main App: https://fancydictionary.com
  • Traefik Dashboard: https://traefik.fancydictionary.com
    • Username: admin
    • Password: Set in GitHub Secrets

Local Development

# Install dependencies
npm install

# Start development server
npm start

# Build for production
npm run build

# Run tests
npm test

Project Structure

├── src/                    # React application source
├── scripts/               # Deployment scripts
├── traefik/              # Traefik configuration
├── docker-compose.yml    # Docker services
├── Dockerfile.prod       # Production Docker image
└── .github/workflows/    # GitHub Actions

SSL Certificate

SSL certificates are automatically generated by Let's Encrypt through Traefik. The certificates are stored in traefik/acme.json.

Note: Let's Encrypt has rate limits (5 certificates per domain per week). If you encounter rate limiting, wait 24 hours before retrying.

About

Dictionary for improving vocabulary

Resources

Stars

Watchers

Forks

Packages

No packages published