mirror of
https://github.com/getlago/lago.git
synced 2025-01-03 13:30:02 +07:00
16a058e0fd
* misc: Add local dev env configuration * add configuration for api * update modules
100 lines
2.9 KiB
YAML
100 lines
2.9 KiB
YAML
version: "3.8"
|
|
|
|
volumes:
|
|
front_node_modules:
|
|
front_dist:
|
|
postgres_data:
|
|
redis_data:
|
|
|
|
services:
|
|
traefik:
|
|
image: "traefik:v2.5.4"
|
|
container_name: lago_traefik
|
|
ports:
|
|
- 80:80
|
|
- 443:443
|
|
volumes:
|
|
- ./traefik/traefik.yml:/etc/traefik/traefik.yml
|
|
- ./traefik/dynamic.yml:/etc/traefik/dynamic.yml
|
|
- ./traefik/certs:/etc/certs
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.traefik.rule=Host(`traefik.lago.dev`)"
|
|
- "traefik.http.routers.traefik.entrypoints=web,websecure"
|
|
- "traefik.http.routers.traefik.tls=true"
|
|
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
|
|
|
|
db:
|
|
image: postgres:14.0-alpine
|
|
container_name: lago_db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-lago}
|
|
POSTGRES_USER: ${POSTGRES_USER:-lago}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
PGDATA: /data/postgres
|
|
volumes:
|
|
- postgres_data:/data/postgres
|
|
ports:
|
|
- 5432:5432
|
|
|
|
redis:
|
|
image: redis:6.2-alpine
|
|
container_name: lago_redis
|
|
restart: unless-stopped
|
|
environment:
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-changeme}
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- 6379:6379
|
|
|
|
front:
|
|
image: front
|
|
container_name: lago_front
|
|
stdin_open: true
|
|
restart: unless-stopped
|
|
build:
|
|
context: ./front
|
|
dockerfile: $LAGO_PATH/front/Dockerfile.dev
|
|
volumes:
|
|
- $LAGO_PATH/front:/app
|
|
- front_node_modules:/app/node_modules
|
|
- front_dist:/app/dist
|
|
environment:
|
|
- NODE_ENV=development
|
|
- API_URL=https://api.lago.dev
|
|
- APP_DOMAIN=https://app.lago.dev
|
|
- CODEGEN_API=https://api.lago.dev:3000
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.app.rule=Host(`app.lago.dev`)"
|
|
- "traefik.http.routers.app.entrypoints=web,websecure"
|
|
- "traefik.http.routers.app.tls=true"
|
|
- "traefik.http.services.app.loadbalancer.server.port=8080"
|
|
|
|
api:
|
|
image: api
|
|
container_name: lago_api
|
|
restart: unless-stopped
|
|
build:
|
|
context: ./api
|
|
dockerfile: $LAGO_PATH/api/Dockerfile.dev
|
|
volumes:
|
|
- $LAGO_PATH/api:/app
|
|
environment:
|
|
- DATABASE_URL=postgresql://${POSTGRES_USER:-lago}:${POSTGRES_PASSWORD:-changeme}@db:5432/${POSTGRES_DB:-lago}
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.api_http.rule=Host(`api.lago.dev`)"
|
|
- "traefik.http.routers.api_http.entrypoints=web"
|
|
- "traefik.http.routers.api_http.service=api_http"
|
|
- "traefik.http.services.api_http.loadbalancer.server.port=3000"
|
|
- "traefik.http.routers.api.rule=Host(`api.lago.dev`)"
|
|
- "traefik.http.routers.api.entrypoints=websecure"
|
|
- "traefik.http.routers.api.service=api"
|
|
- "traefik.http.routers.api.tls=true"
|
|
- "traefik.http.services.api.loadbalancer.server.port=3000"
|
|
|
|
|