diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..318da911 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +--- +# You can set variables in .env file in root folder +# +# List of variables with default values (HTTP only): +# +# TRAEFIK_NETWORK=traefik_default +# TRAEFIK_ENTRYPOINTS=web +# TRAEFIK_HOST=localhost +# TRAEFIK_TLS=false +# TRAEFIK_LETSENCRYPT_CHALLENGE_TYPE=le +# PUBLIC_PORT=7000:7000 + +services: + app: + build: . + command: ["s"] + deploy: + replicas: 1 + labels: + # Here is the Traefik configuration, if you use one + traefik.docker.network: ${TRAEFIK_NETWORK:-traefik_default} # Common network for traefik and rembg + traefik.enable: true + traefik.http.routers.rembg.entrypoints: ${TRAEFIK_ENTRYPOINTS:-web} # Traefik endpoints. By default it is web for HTTP on 80 port and websecure for HTTPS on 443 + traefik.http.routers.rembg.rule: Host(`${TRAEFIK_HOST:-localhost}`) # Public name for traefik + traefik.http.routers.rembg.service: rembg + traefik.http.routers.rembg.tls: ${TRAEFIK_TLS:-false} # Change this if you use HTTPS + traefik.http.routers.rembg.tls.certresolver: ${TRAEFIK_LETSENCRYPT_CHALLENGE_TYPE:-le} # Your configured certificatesResolvers in traefik + traefik.http.services.rembg.loadbalancer.server.port: 7000 + ports: + - ${PUBLIC_PORT:-7000:7000} +version: '3'