Files
mymovies-api/docker-compose.yaml
T

44 lines
1.6 KiB
YAML

services:
mymovies-api:
build:
context: .
dockerfile: Dockerfile
image: mymovies-api:latest
container_name: mymovies-api
restart: unless-stopped
expose:
- '8000'
healthcheck:
test: ['CMD', 'python', '-c', "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/health',timeout=3).status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
environment:
APP_DIR: /data/app
DEPLOY_WEBHOOK: '${DEPLOY_WEBHOOK}'
COOLIFY_TOKEN: '${COOLIFY_TOKEN}'
volumes:
- '/data/coolify/applications/e9ghwyp5n5kyfshk55krbhki:/data/app:rw'
networks:
coolify:
aliases:
- mymovies-api
labels:
- traefik.enable=true
- traefik.http.middlewares.gzip.compress=true
- traefik.http.middlewares.mymovies-strip.stripprefix.prefixes=/movies-api
- 'traefik.http.routers.mymovies-api.entryPoints=https'
- traefik.http.routers.mymovies-api.middlewares=gzip,mymovies-auth,mymovies-strip
- 'traefik.http.routers.mymovies-api.rule=Host(`movies-lmp-18.dynv6.net`) && PathPrefix(`/movies-api`)'
- traefik.http.routers.mymovies-api.tls.certresolver=letsencrypt
- traefik.http.routers.mymovies-api.tls=true
- traefik.http.services.mymovies-api.loadbalancer.server.port=8000
# basic auth: user "mymovies", pass "changeme" (htpasswd -nb mymovies changeme)
- 'traefik.http.middlewares.mymovies-auth.basicauth.users=mymovies:$apr1$RJmauepK$zm70y5icJNCqQA.KwmY02/'
networks:
coolify:
external: true
name: coolify
attachable: true