Fix: Add Traefik labels for model.manohargupta.com
This commit is contained in:
parent
6a19374af2
commit
cc068d02bf
1 changed files with 26 additions and 6 deletions
|
|
@ -2,18 +2,16 @@ services:
|
||||||
redis:
|
redis:
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "6379:6379"
|
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
api:
|
api:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: packages/api/Dockerfile
|
dockerfile: packages/api/Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_URL=sqlite:///./remodel.db
|
- DATABASE_URL=sqlite:///./remodel.db
|
||||||
- REDIS_URL=redis://redis:6379
|
- REDIS_URL=redis://redis:6379
|
||||||
|
|
@ -21,6 +19,14 @@ services:
|
||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.api.rule=Host(`model.manohargupta.com`) && PathPrefix(`/api`)"
|
||||||
|
- "traefik.http.routers.api.entrypoints=web"
|
||||||
|
- "traefik.http.services.api.loadbalancer.server.port=8000"
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
- web
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
build:
|
build:
|
||||||
|
|
@ -35,16 +41,30 @@ services:
|
||||||
- redis
|
- redis
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/app/data
|
- ./data:/app/data
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build:
|
build:
|
||||||
context: ./packages/web
|
context: ./packages/web
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "3000:3000"
|
|
||||||
environment:
|
environment:
|
||||||
- NEXT_PUBLIC_API_URL=http://api:8000
|
- NEXT_PUBLIC_API_URL=http://api:8000
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.web.rule=Host(`model.manohargupta.com`)"
|
||||||
|
- "traefik.http.routers.web.entrypoints=web"
|
||||||
|
- "traefik.http.services.web.loadbalancer.server.port=3000"
|
||||||
|
networks:
|
||||||
|
- web
|
||||||
|
|
||||||
|
networks:
|
||||||
|
internal:
|
||||||
|
internal: true
|
||||||
|
web:
|
||||||
|
name: traefik_public
|
||||||
|
external: true
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
redis_data:
|
redis_data:
|
||||||
Loading…
Add table
Reference in a new issue