6.5 KiB
6.5 KiB
Quick Start Guide
Get sexy.pivoine.art running in under 5 minutes using pre-built Docker images.
Prerequisites
- Docker 20.10+
- Docker Compose 2.0+ (optional)
Option 1: Docker Run (Fastest)
Step 1: Pull the Image
docker pull ghcr.io/valknarxxx/sexy:latest
Step 2: Create Environment File
cat > .env.production << EOF
PUBLIC_API_URL=https://api.your-domain.com
PUBLIC_URL=https://your-domain.com
PUBLIC_UMAMI_ID=
LETTERSPACE_API_URL=
LETTERSPACE_API_KEY=
LETTERSPACE_LIST_ID=
EOF
Step 3: Run the Container
docker run -d \
--name sexy-pivoine \
-p 3000:3000 \
--env-file .env.production \
--restart unless-stopped \
ghcr.io/valknarxxx/sexy:latest
Step 4: Verify
# Check if running
docker ps | grep sexy-pivoine
# Check logs
docker logs -f sexy-pivoine
# Test the application
curl http://localhost:3000
Your application is now running at http://localhost:3000 🎉
Option 2: Docker Compose (Recommended)
Step 1: Download docker-compose.production.yml
curl -O https://raw.githubusercontent.com/valknarxxx/sexy/main/docker-compose.production.yml
Or if you have the repository:
cd /path/to/sexy.pivoine.art
Step 2: Create Environment File
cp .env.production.example .env.production
nano .env.production # Edit with your values
Step 3: Start Services
docker-compose -f docker-compose.production.yml up -d
Step 4: Monitor
# View logs
docker-compose -f docker-compose.production.yml logs -f
# Check status
docker-compose -f docker-compose.production.yml ps
Your application is now running at http://localhost:3000 🎉
Accessing Private Images
If the image is in a private registry:
Step 1: Create GitHub Personal Access Token
- Go to https://github.com/settings/tokens
- Click "Generate new token (classic)"
- Select scope:
read:packages - Generate and copy the token
Step 2: Login to GitHub Container Registry
echo YOUR_GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
Step 3: Pull and Run
Now you can pull private images:
docker pull ghcr.io/valknarxxx/sexy:latest
Environment Variables
Required
| Variable | Description | Example |
|---|---|---|
PUBLIC_API_URL |
Directus API endpoint | https://api.pivoine.art |
PUBLIC_URL |
Frontend URL | https://sexy.pivoine.art |
Optional
| Variable | Description | Example |
|---|---|---|
PUBLIC_UMAMI_ID |
Analytics tracking ID | abc-123-def |
LETTERSPACE_API_URL |
Newsletter API | https://api.letterspace.com/v1 |
LETTERSPACE_API_KEY |
Newsletter API key | sk_live_... |
LETTERSPACE_LIST_ID |
Mailing list ID | list_abc123 |
Common Commands
View Logs
# Follow logs (Docker Run)
docker logs -f sexy-pivoine
# Follow logs (Docker Compose)
docker-compose -f docker-compose.production.yml logs -f
Restart Container
# Docker Run
docker restart sexy-pivoine
# Docker Compose
docker-compose -f docker-compose.production.yml restart
Stop Container
# Docker Run
docker stop sexy-pivoine
# Docker Compose
docker-compose -f docker-compose.production.yml down
Update to Latest Version
# Docker Run
docker pull ghcr.io/valknarxxx/sexy:latest
docker stop sexy-pivoine
docker rm sexy-pivoine
# Then re-run the docker run command from Step 3
# Docker Compose
docker-compose -f docker-compose.production.yml pull
docker-compose -f docker-compose.production.yml up -d
Shell Access
# Docker Run
docker exec -it sexy-pivoine sh
# Docker Compose
docker-compose -f docker-compose.production.yml exec frontend sh
Available Image Tags
| Tag | Description | Use Case |
|---|---|---|
latest |
Latest stable build from main | Production |
v1.0.0 |
Specific version | Production (pinned) |
develop |
Latest from develop branch | Staging |
main-abc123 |
Specific commit | Testing |
Best Practice: Use version tags in production for predictable deployments.
Production Deployment
1. Use Version Tags
# Instead of :latest
docker pull ghcr.io/valknarxxx/sexy:v1.0.0
2. Add Resource Limits
docker run -d \
--name sexy-pivoine \
-p 3000:3000 \
--env-file .env.production \
--memory="2g" \
--cpus="2" \
--restart unless-stopped \
ghcr.io/valknarxxx/sexy:v1.0.0
3. Use a Reverse Proxy
Example with nginx:
server {
listen 80;
server_name sexy.pivoine.art;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
4. Enable HTTPS
Use Certbot or similar:
certbot --nginx -d sexy.pivoine.art
Health Check
The container includes a built-in health check:
# Check container health
docker inspect --format='{{.State.Health.Status}}' sexy-pivoine
Possible statuses:
starting- Container just startedhealthy- Application is respondingunhealthy- Application is not responding
Troubleshooting
Container Exits Immediately
# Check logs
docker logs sexy-pivoine
# Common issues:
# - Missing environment variables
# - Port 3000 already in use
# - Invalid environment variable values
Cannot Pull Image
# For private images, ensure you're logged in
docker login ghcr.io
# Check if image exists
docker pull ghcr.io/valknarxxx/sexy:latest
Port Already in Use
# Use a different port
docker run -d -p 8080:3000 ghcr.io/valknarxxx/sexy:latest
# Or find what's using port 3000
lsof -i :3000
Application Not Accessible
# Check if container is running
docker ps | grep sexy-pivoine
# Check logs
docker logs sexy-pivoine
# Verify port mapping
docker port sexy-pivoine
# Test from inside container
docker exec sexy-pivoine wget -O- http://localhost:3000
Next Steps
- Production setup: See DOCKER.md
- Development: See CLAUDE.md
- CI/CD: See .github/workflows/README.md
Support
- Issues: https://github.com/valknarxxx/sexy/issues
- Discussions: https://github.com/valknarxxx/sexy/discussions
- Security: Report privately via GitHub Security tab
License
See LICENSE file for details.