version: '3'

services:
  postgres:
    image: postgres
    restart: always
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: strapi
      POSTGRES_PASSWORD: strapi
      POSTGRES_DB: strapi
    ports:
      - '5432:5432'

  mysql:
    image: mysql:8
    restart: always
    environment:
      MYSQL_DATABASE: strapi
      MYSQL_USER: strapi
      MYSQL_PASSWORD: strapi
      MYSQL_ROOT_HOST: '%'
      MYSQL_ROOT_PASSWORD: strapi
    volumes:
      - mysqldata:/var/lib/mysql
    ports:
      - '3306:3306'

volumes:
  pgdata:
  mysqldata:
