![]() |
1 month ago | |
---|---|---|
public | 2 months ago | |
src | 1 month ago | |
.gitignore | 2 months ago | |
Dockerfile | 1 month ago | |
README.md | 1 month ago | |
components.json | 1 month ago | |
environment.d.ts | 1 month ago | |
eslint.config.mjs | 2 months ago | |
next.config.ts | 1 month ago | |
package-lock.json | 1 month ago | |
package.json | 1 month ago | |
postcss.config.mjs | 2 months ago | |
tailwind.config.ts | 1 month ago | |
tsconfig.json | 2 months ago |
services:
byom-web:
container_name: byom-web
build:
context: /path/to/byom-web
dockerfile: Dockerfile
environment:
- NEXT_PUBLIC_API_URL=${API_URL:-http://localhost:3001}
- NODE_ENV=production
labels:
- "traefik.enable=true"
- "traefik.http.routers.web.rule=Host(`${DOMAIN:-localhost}`)"
- "traefik.http.services.web.loadbalancer.server.port=3000"
# HTTPS redirect
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.web.middlewares=https-redirect"
# Secure router
- "traefik.http.routers.web-secure.rule=Host(`${DOMAIN:-localhost}`)"
- "traefik.http.routers.web-secure.entrypoints=websecure"
- "traefik.http.routers.web-secure.tls=true"
networks:
- traefik-public
restart: unless-stopped
networks:
traefik-public:
external: true
Create network for Traefik:
docker network create traefik-public
Configure environment variables:
# Copy example env file
cp .env.example .env
# Edit with your settings
nano .env
Deploy the stack:
docker compose up -d
# Domain configuration
DOMAIN=your-domain.com # Your domain name
API_URL=https://api.domain.com # Backend API URL
# Optional SSL config
SSL_EMAIL=your@email.com # For Let's Encrypt notifications
https://your-domain.com
http://localhost:8080
(development only)# View logs
docker compose logs -f
# Restart services
docker compose restart
# Stop stack
docker compose down
# Update images and restart
docker compose pull
docker compose up -d