version: "3.8" services: valkey-mywebsite: image: valkey/valkey:8.0.2 container_name: valkey-mywebsite ports: - "6379:6379" volumes: - valkey_data:/data restart: unless-stopped networks: - app_network healthcheck: test: ["CMD", "valkey-cli", "ping"] interval: 30s timeout: 10s retries: 3 postgres-mywebsite: image: postgres:16 container_name: postgres-mywebsite # fill these in with postgres env vars environment: POSTGRES_USER: wyatt POSTGRES_PASSWORD: test # <<< replace this ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./init-db:/docker-entrypoint-initdb.d restart: unless-stopped networks: - app_network healthcheck: test: ["CMD-SHELL", "pg_isready -U wyatt -d postgres"] interval: 30s timeout: 10s retries: 3 frontend: image: scm.wyattjmiller.com/wymiller/my-website-v2_frontend:master container_name: frontend ports: - "8000:8000" # fill these in the frontend env vars for prod environment: - BASE_URI_API= - BASE_URI_WEB= - EMAIL_FORM= - RSS_URI= - SITEMAP_URI= - VIRTUAL_HOST=wyattjmiller.com - VIRTUAL_PORT=80 - LETSENCRYPT_HOST=wyattjmiller.com - LETSENCRYPT_EMAIL=wjmiller2016@gmail.com volumes: - ./deno-fresh-app:/app - /app/node_modules depends_on: postgres: condition: service_healthy valkey: condition: service_healthy restart: unless-stopped networks: - app_network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/health"] interval: 30s timeout: 10s retries: 3 public-mywebsite: image: scm.wyattjmiller.com/wymiller/my-website-v2_public:master container_name: public-mywebsite ports: - "3000:3000" # fill these in with public env vars for prod environment: - DATABASE_URL= - REDIS_URL= - BASE_URI_WEB= depends_on: postgres: condition: service_healthy valkey: condition: service_healthy restart: unless-stopped networks: - app_network # make sure to change the url too healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 task-mywebsite: image: scm.wyattjmiller.com/wymiller/my-website-v2_task:master container_name: task-mywebsite # fill these in with task env vars for prod environment: - DATABASE_URL= - BASE_URI_API= - S3_ACCESS_KEY= - S3_SECRET_KEY= - S3_BUCKET= - REDIS_URL= depends_on: postgres: condition: service_healthy valkey: condition: service_healthy volumes: - ./backend/task/app:/app/posts # <<< place all markdown files here restart: unless-stopped networks: - app_network healthcheck: test: ["CMD", "pgrep", "-f", "task-mywebsite"] interval: 30s timeout: 10s retries: 3 networks: app_network: driver: bridge ipam: config: - subnet: 172.20.0.0/16 volumes: valkey_mywebsite_data: driver: local postgres_mywebsite_data: driver: local