docker-compose.yml 538 Bytes
Newer Older
Alexandros Georgantas's avatar
Alexandros Georgantas committed
1 2 3 4
version: '3'

services:
  postgres:
Yannis Barlas's avatar
Yannis Barlas committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
    image: postgres:10-alpine
    restart: always
    ports:
      - ${POSTGRES_PORT:-5432}:5432
    environment:
      - POSTGRES_USER
      - POSTGRES_DB
      - POSTGRES_PASSWORD
      - POSTGRES_PORT
    volumes:
      - ./data/postgres:/var/lib/postgresql
      - ./scripts/test.sql:/docker-entrypoint-initdb.d/test.sql

  postgres_test:
    image: postgres:10-alpine
    ports:
      - 5433:5432
    environment:
      - POSTGRES_DB=test
      - POSTGRES_USER=test
      - POSTGRES_PASSWORD=pass