version: '3.1' services: pg: image: postgres:alpine restart: always volumes: - ./autoload:/docker-entrypoint-initdb.d - /opt/data/containers/sqldb/pgdata:/var/lib/postgresql/data environment: POSTGRES_DB: test POSTGRES_USER: test POSTGRES_PASSWORD: test ports: - 5432:5432 adminer: image: adminer restart: always ports: - 8888:8080 grafana: image: grafana/grafana:9.5.12 restart: always environment: GF_SMTP_ENABLED: "true" GF_SMTP_HOST: "smtp.example.com" ports: - "3000:3000" volumes: - /opt/data/containers/sqldb/grafana:/var/lib/grafana depends_on: - pg