mirror of
https://github.com/Viren070/docker-compose-template.git
synced 2025-12-01 23:17:00 +01:00
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
services:
|
|
tmdb-collections:
|
|
image: tmdb-collections
|
|
container_name: tmdb-collections
|
|
restart: unless-stopped
|
|
build:
|
|
context: https://github.com/youchi1/tmdb-collections.git
|
|
dockerfile_inline: |
|
|
FROM node:22.17-alpine
|
|
WORKDIR /app
|
|
|
|
# Copy package files first for better Docker layer caching
|
|
COPY package*.json ./
|
|
|
|
# Install production dependencies only
|
|
RUN npm ci --omit=dev --ignore-scripts && \
|
|
npm cache clean --force
|
|
|
|
# Copy application files
|
|
COPY Images ./Images
|
|
COPY Public ./Public
|
|
COPY lib ./lib
|
|
COPY index.js server.js newrelic.js ./
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
ENTRYPOINT ["npm", "start"]
|
|
expose:
|
|
- 7000
|
|
env_file:
|
|
- .env
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.tmdb-collections.rule=Host(`${TMDB_COLLECTIONS_HOSTNAME?}`)"
|
|
- "traefik.http.routers.tmdb-collections.entrypoints=websecure"
|
|
- "traefik.http.routers.tmdb-collections.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.tmdb-collections.loadbalancer.server.port=7000"
|
|
- "traefik.http.routers.tmdb-collections.middlewares=authelia@docker"
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"wget",
|
|
"--quiet",
|
|
"--tries=1",
|
|
"--spider",
|
|
"http://localhost:7000/manifest.json",
|
|
]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
profiles:
|
|
- tmdb-collections
|
|
- all |