This guide shows how to deploy your Dictionary app with automatic SSL certificates using Traefik and Let's Encrypt.
- Docker and Docker Compose installed
- A domain name pointing to your server
- Ports 80 and 443 open on your server
-
Run the setup script:
./setup-production.sh
-
Update configuration files:
- Replace
yourdomain.comwith your actual domain indocker-compose.yml - Replace
your-email@example.comwith your email intraefik/traefik.yml
- Replace
-
Deploy:
docker-compose up -d
If you prefer to set up manually:
-
Create Traefik directory:
mkdir -p traefik touch traefik/acme.json chmod 600 traefik/acme.json
-
Create Docker network:
docker network create web
-
Update configuration files (see above)
-
Deploy:
docker-compose up -d
- ✅ Automatic SSL certificates from Let's Encrypt
- ✅ HTTP to HTTPS redirect
- ✅ Traefik dashboard for monitoring
- ✅ Automatic certificate renewal
- ✅ Load balancing (ready for multiple instances)
- Your App: https://yourdomain.com
- Traefik Dashboard: https://traefik.yourdomain.com
Check logs:
# App logs
docker-compose logs dictionary-app
# Traefik logs
docker-compose logs traefik
# All logs
docker-compose logs -f- Ensure your domain DNS points to the server
- Check that ports 80 and 443 are open
- Verify email address in Traefik config
- Check if containers are running:
docker-compose ps - Check app logs:
docker-compose logs dictionary-app - Verify Traefik labels in docker-compose.yml
- Check if the password hash is correctly set in docker-compose.yml
- Verify the dashboard hostname in Traefik labels
To run multiple instances of your app:
# In docker-compose.yml
dictionary-app:
deploy:
replicas: 3Backup your SSL certificates:
cp traefik/acme.json backup-acme-$(date +%Y%m%d).json- The Traefik dashboard is protected with basic auth
- SSL certificates are automatically renewed
- Security headers are configured in Nginx
- Hidden files are blocked from access