diff --git a/docker-compose.yml b/docker-compose.yml index 2ea35a1..74c503e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,108 +1,20 @@ services: - # PostgreSQL Database - db: - image: postgres:16-alpine - container_name: rswag-db - restart: unless-stopped - environment: - POSTGRES_USER: rswag - POSTGRES_PASSWORD: ${DB_PASSWORD:-devpassword} - POSTGRES_DB: rswag - volumes: - - rswag-db-data:/var/lib/postgresql/data - networks: - - rswag-internal - healthcheck: - test: ["CMD-SHELL", "pg_isready -U rswag"] - interval: 5s - timeout: 5s - retries: 5 - - # Redis for sessions/cache - redis: - image: redis:7-alpine - container_name: rswag-redis - restart: unless-stopped - volumes: - - rswag-redis-data:/data - networks: - - rswag-internal - - # FastAPI Backend - backend: + # Static landing page + landing: build: - context: ./backend + context: ./landing dockerfile: Dockerfile - container_name: rswag-backend + container_name: rswag-landing restart: unless-stopped - environment: - - INFISICAL_CLIENT_ID=${INFISICAL_CLIENT_ID} - - INFISICAL_CLIENT_SECRET=${INFISICAL_CLIENT_SECRET} - - INFISICAL_PROJECT_SLUG=rswag - - INFISICAL_ENV=prod - - INFISICAL_URL=http://infisical:8080 - - DATABASE_URL=postgresql://rswag:${DB_PASSWORD:-devpassword}@db:5432/rswag - - REDIS_URL=redis://redis:6379 - - DESIGNS_PATH=/app/designs - - CONFIG_PATH=/app/config - - SPACES_PATH=/app/spaces - - PRINTFUL_STORE_ID=${PRINTFUL_STORE_ID:-} - - PUBLIC_URL=${PUBLIC_URL:-https://rswag.online} - - SMTP_HOST=${SMTP_HOST:-mail.rmail.online} - - SMTP_PORT=${SMTP_PORT:-587} - - SMTP_USER=${SMTP_USER:-noreply@rswag.online} - - SMTP_PASSWORD=${SMTP_PASSWORD:-} - - SMTP_FROM_EMAIL=${SMTP_FROM_EMAIL:-noreply@rswag.online} - - SMTP_FROM_NAME=${SMTP_FROM_NAME:-rSwag} - volumes: - - ./designs:/app/designs - - ./config:/app/config:ro - - ./spaces:/app/spaces:ro - - ./frontend/public/mockups:/app/mockups:ro - depends_on: - db: - condition: service_healthy networks: - - rswag-internal - traefik-public labels: - "traefik.enable=true" - - "traefik.http.routers.rswag-api.rule=(Host(`rswag.online`) || Host(`fungiswag.jeffemmett.com`) || HostRegexp(`{subdomain:[a-z0-9-]+}.rswag.online`)) && PathPrefix(`/api`)" - - "traefik.http.routers.rswag-api.entrypoints=web" - - "traefik.http.routers.rswag-api.priority=130" - - "traefik.http.services.rswag-api.loadbalancer.server.port=8000" + - "traefik.http.routers.rswag-landing.rule=Host(`rswag.online`) || Host(`www.rswag.online`)" + - "traefik.http.routers.rswag-landing.entrypoints=web" + - "traefik.http.services.rswag-landing.loadbalancer.server.port=80" - "traefik.docker.network=traefik-public" - # Next.js Frontend - frontend: - build: - context: ./frontend - dockerfile: Dockerfile - args: - - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8000/api} - container_name: rswag-frontend - restart: unless-stopped - environment: - - NODE_ENV=production - depends_on: - - backend - networks: - - rswag-internal - - traefik-public - labels: - - "traefik.enable=true" - - "traefik.http.routers.rswag-web.rule=Host(`rswag.online`) || Host(`fungiswag.jeffemmett.com`) || HostRegexp(`{subdomain:[a-z0-9-]+}.rswag.online`)" - - "traefik.http.routers.rswag-web.entrypoints=web" - - "traefik.http.routers.rswag-web.priority=130" - - "traefik.http.services.rswag-web.loadbalancer.server.port=3000" - - "traefik.docker.network=traefik-public" - -volumes: - rswag-db-data: - rswag-redis-data: - networks: - rswag-internal: - driver: bridge traefik-public: external: true diff --git a/landing/index.html b/landing/index.html index b07352f..9f6f7e2 100644 --- a/landing/index.html +++ b/landing/index.html @@ -699,8 +699,8 @@ with no upfront inventory. Revenue flows directly to community treasuries through rFunds.