Ctrl K
ComunidadGuías…

compose.yaml

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
services:
  frontend:
    container_name: hyvor-post-frontend
    build:
      context: .
      target: frontend-dev
    volumes:
      - ./frontend/src:/app/frontend/src
      - ./frontend/static:/app/frontend/static
      - ./frontend/vite.config.ts:/app/frontend/vite.config.ts
      - ./frontend/package.json:/app/frontend/package.json
      - ./frontend/package-lock.json:/app/frontend/package-lock.json
      - ./frontend/tsconfig.json:/app/frontend/tsconfig.json
      - ./frontend/svelte.config.js:/app/frontend/svelte.config.js
      - ./shared:/app/shared
      - ./docs:/app/docs
    labels:
      traefik.enable: true
      traefik.http.routers.hyvor-post-frontend.rule: Host(`post.hyvor.localhost`)
      traefik.http.routers.hyvor-post-frontend.entrypoints: https
      traefik.http.routers.hyvor-post-frontend.tls: true
      traefik.http.routers.hyvor-post-frontend.middlewares: vite-retry@file
      traefik.http.services.hyvor-post-frontend.loadbalancer.server.port: 80

    networks:
      - hyvor-network

  backend:
    container_name: hyvor-post-backend
    build:
      context: .
      target: backend-dev
    volumes:
      - ./backend:/app/backend
      #- ../internal:/app/backend/vendor/hyvor/internal:ro
      - ./shared:/app/shared
    labels:
      traefik.enable: true
      # backend
      traefik.http.routers.hyvor-post-backend.rule: Host(`post.hyvor.localhost`) && PathPrefix(`/api`)
      traefik.http.routers.hyvor-post-backend.entrypoints: https
      traefik.http.routers.hyvor-post-backend.tls: true
      traefik.http.routers.hyvor-post-backend.service: hyvor-post-backend
      # service
      traefik.http.services.hyvor-post-backend.loadbalancer.server.port: 80
    networks:
      hyvor-network:
        aliases:
          - post.hyvor.internal
    healthcheck:
      test: ls
      disable: true

  embed:
    container_name: hyvor-post-embed
    build:
      context: .
      target: embed-dev
    volumes:
      - ./embed:/app/embed
    labels:
      traefik.enable: true
      # embed
      traefik.http.routers.hyvor-post-embed.rule: Host(`hyvorpost.localhost`)
      traefik.http.routers.hyvor-post-embed.entrypoints: http
      traefik.http.routers.hyvor-post-embed.service: hyvor-post-embed
      # service
      traefik.http.services.hyvor-post-embed.loadbalancer.server.port: 80
    networks:
      - hyvor-network

  archive:
    container_name: hyvor-post-archive
    build:
      context: .
      target: archive-dev
    volumes:
      - ./archive/src:/app/archive/src
      - ./archive/static:/app/archive/static
      - ./archive/vite.config.ts:/app/archive/vite.config.ts
      - ./archive/package.json:/app/archive/package.json
      - ./archive/package-lock.json:/app/archive/package-lock.json
      - ./archive/tsconfig.json:/app/archive/tsconfig.json
      - ./archive/svelte.config.js:/app/archive/svelte.config.js
    labels:
      traefik.enable: true
      traefik.http.routers.hyvor-post-archive.rule: HostRegexp(`^.+\.hyvorpost\.localhost$`)
      traefik.http.routers.hyvor-post-archive.entrypoints: http
      traefik.http.services.hyvor-post-archive.loadbalancer.server.port: 80
    networks:
      - hyvor-network

networks:
  hyvor-network:
    external: true