version: '3.8' services: portfolio: build: context: . dockerfile: Dockerfile image: lisilou-portfolio-web:local container_name: lisilou-portfolio restart: unless-stopped ports: - "8080:80" volumes: # Mount config for easy updates without rebuilding - ./config:/usr/share/nginx/html/config:ro # Mount images for easy updates - ./public/images:/usr/share/nginx/html/images:ro environment: - TZ=America/Denver healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s networks: - web api: build: context: ./api dockerfile: Dockerfile image: lisilou-portfolio-api:local container_name: lisilou-api restart: unless-stopped env_file: - ./api/.env volumes: - ./api/data:/app/data - ./api/signed-contracts:/app/signed-contracts - ./api/contracts:/app/contracts:ro # Read-write: the admin config screen (issue #14) edits site.json here. # Shares the same host directory the portfolio/nginx service mounts # read-only, so writes show up on the live site (subject to its 5-min cache). - ./config:/app/config networks: - web healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3001/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 15s networks: web: external: true