version: '3' networks: land_serverless_network: external: true services: redis: image: redis:7.0 restart: always command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD} volumes: - ${REDIS_DIR}:/data networks: - land_serverless_network proxy: image: traefik:3.0 command: --api.insecure=true --providers.redis.endpoints=redis:6379 --providers.redis.password=${REDIS_PASSWORD} --providers.docker=true --providers.docker.exposedByDefault=false ports: - "80:80" # - "8080:8080" # traefik dashboard networks: - land_serverless_network volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - redis labels: - "traefik.enable=true" - "traefik.http.routers.dashboard.rule=Host(`${TRAEFIK_DASHBOARD_DOMAIN}`)" - "traefik.http.routers.dashboard.middlewares=dashboard-auth" - "traefik.http.services.dashboard.loadbalancer.server.port=8080" - "traefik.http.middlewares.dashboard-auth.basicauth.users=${TRAEFIK_DASHBOARD_BASIC_AUTH}" mysql: image: mysql:8.0 cap_add: - SYS_NICE restart: always environment: - MYSQL_DATABASE=${MYSQL_DATABASE} - MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD} volumes: - ${MYSQL_DATA_DIR}:/var/lib/mysql networks: - land_serverless_network land-server: image: ghcr.io/fuxiaohei/land-server:latest restart: always environment: - GRPC_ADDR=${LAND_SERVER_GRPC_ADDR} - STORAGE_LOCAL_PATH=/data - DB_HOST=${MYSQL_HOST} - DB_PORT=${MYSQL_PORT} - DB_USER=${MYSQL_USER} - DB_PASSWORD=${MYSQL_PASSWORD} - DB_NAME=${MYSQL_DATABASE} - LOCAL_REGION_ENABLED=true - LOCAL_REGION_REDIS_ADDR=redis:6379 - LOCAL_REGION_REDIS_PASSWORD=${REDIS_PASSWORD} - LOCAL_REGION_RUNTIME=land-runtime-docker-compose@docker - PROD_DOMAIN=${LAND_SERVER_PROD_DOMAIN} - PROD_PROTOCOL=${LAND_SERVER_PROD_PROTOCOL} depends_on: - mysql - redis volumes: - ${LAND_SERVER_STORAGE_DIR}:/data networks: - land_serverless_network labels: - traefik.enable=true - traefik.http.routers.land-server.rule=Host(`${LAND_SERVER_DOMAIN}`) - traefik.http.routers.land-server.middlewares=land-server-grpcweb@docker - traefik.http.middlewares.land-server-grpcweb.grpcweb.allowOrigins=* # this feature need traefik 3.0 - traefik.http.services.land-server-docker-compose.loadbalancer.server.scheme=h2c land-runtime: image: ghcr.io/fuxiaohei/land-runtime:latest restart: always environment: - HTTP_ADDR=${LAND_RUMTIME_HTTP_ADDR} - STORAGE_LOCAL_PATH=/data deploy: replicas: 2 networks: - land_serverless_network volumes: - ${LAND_RUMTIME_STORAGE_DIR}:/data labels: - traefik.enable=true - traefik.http.routers.land-runtime.rule=Host(`${LAND_RUNTIME_DOMAIN}`) land-web: image: ghcr.io/fuxiaohei/land-web:latest restart: always environment: - API_ADDRESS=${LAND_WEB_API_ADDR} networks: - land_serverless_network labels: - traefik.enable=true - traefik.http.routers.land-web.rule=Host(`${LAND_WEB_DOMAIN}`)