91 lines
1.8 KiB
YAML
91 lines
1.8 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
postgres:
|
|
container_name: postgres
|
|
image: postgres:11
|
|
restart: always
|
|
volumes:
|
|
- db_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
env_file:
|
|
- ./database/.env
|
|
networks:
|
|
- mlbgameday
|
|
|
|
flyway:
|
|
container_name: flyway
|
|
image: flyway/flyway:9.2.1
|
|
command: -connectRetries=60 migrate
|
|
volumes:
|
|
- ./database/sql:/flyway/sql
|
|
- ./database/conf:/flyway/conf
|
|
env_file:
|
|
- ./database/.env
|
|
networks:
|
|
- mlbgameday
|
|
depends_on:
|
|
- postgres
|
|
|
|
graphql:
|
|
container_name: graphql
|
|
image:
|
|
|
|
teams:
|
|
container_name: teams
|
|
build:
|
|
context: ./teams
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "5520:80"
|
|
env_file:
|
|
- ./database/.env
|
|
restart: on-failure
|
|
networks:
|
|
- mlbgameday
|
|
depends_on:
|
|
- postgres
|
|
|
|
venues:
|
|
container_name: venues
|
|
build:
|
|
context: ./venues
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "5510:80"
|
|
env_file:
|
|
- ./database/.env
|
|
restart: on-failure
|
|
networks:
|
|
- mlbgameday
|
|
depends_on:
|
|
- postgres
|
|
|
|
hasura:
|
|
container_name: hasura
|
|
image: hasura/graphql-engine:v2.16.1.cli-migrations-v3
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- postgres
|
|
- teams
|
|
- venues
|
|
restart: on-failure
|
|
environment:
|
|
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgres@postgres:5432/postgres
|
|
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
|
|
HASURA_GRAPHQL_DEV_MODE: "true"
|
|
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
|
|
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
|
|
volumes:
|
|
- ./hasura/metadata:/hasura-metadata
|
|
networks:
|
|
- mlbgameday
|
|
|
|
volumes:
|
|
db_data:
|
|
|
|
networks:
|
|
mlbgameday:
|
|
driver: bridge |