version: '3.8' services: db: image: postgres:16-alpine container_name: canina_db restart: always environment: POSTGRES_USER: canina POSTGRES_PASSWORD: caninapassword POSTGRES_DB: caninadb ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data redis: image: redis:7-alpine container_name: canina_redis restart: always ports: - "16379:6379" backend: build: context: ./backend dockerfile: Dockerfile container_name: canina_backend restart: always environment: - DATABASE_URL=postgresql://canina:caninapassword@db:5432/caninadb?schema=public - REDIS_HOST=redis - REDIS_PORT=6379 - PORT=3000 ports: - "3000:3000" depends_on: - db - redis frontend: build: context: . dockerfile: Dockerfile container_name: canina_frontend restart: always ports: - "3001:80" depends_on: - backend volumes: postgres_data: