version: '3.5'
services:
  db:
    container_name: db
    image: postgres:13
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: dbpass
      POSTGRES_DB: shopper
      PGDATA: /data/postgres
    volumes:
       - ./volumes/db:/data/dump
    ports:
      - "5432:5432"
    networks:
      - happeas-dev-db
    restart: unless-stopped

  redis-server:
    container_name: redis
    image: redis:latest
    restart: always
    command: "redis-server /etc/redis/redis.conf"
    ports:
      - "6379:6379"
    networks:
      - happeas-dev-db
    volumes:
      - "./volumes/cache:/etc/redis"

networks:
  happeas-dev-db:
    external: true
