mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-10 14:14:17 +00:00
66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
version: '2.4'
|
|
services:
|
|
cache:
|
|
image: redis:alpine
|
|
volumes:
|
|
- redis_data:/data
|
|
restart: always
|
|
|
|
db:
|
|
image: postgres
|
|
environment:
|
|
POSTGRES_PASSWORD: 'pokemon'
|
|
POSTGRES_USER: 'ash'
|
|
POSTGRES_DB: 'pokeapi'
|
|
volumes:
|
|
- pg_data:/var/lib/postgresql/data
|
|
restart: always
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: ./Resources/docker/app/Dockerfile
|
|
volumes:
|
|
- .:/code
|
|
links:
|
|
- db
|
|
- cache
|
|
depends_on:
|
|
- db
|
|
- cache
|
|
restart: always
|
|
|
|
web:
|
|
image: nginx:alpine
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
restart: always
|
|
command: [nginx-debug, '-g', 'daemon off;']
|
|
volumes:
|
|
- ./Resources/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
volumes_from:
|
|
- app:ro
|
|
links:
|
|
- app
|
|
|
|
graphql-engine:
|
|
image: hasura/graphql-engine:v2.0.0-alpha.4
|
|
ports:
|
|
- "8080:8080"
|
|
depends_on:
|
|
- "db"
|
|
restart: always
|
|
environment:
|
|
HASURA_GRAPHQL_DATABASE_URL: postgres://ash:pokemon@db:5432/pokeapi
|
|
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
|
|
HASURA_GRAPHQL_DEV_MODE: "false"
|
|
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
|
|
HASURA_GRAPHQL_ADMIN_SECRET: pokemon
|
|
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anon
|
|
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
|
|
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
|
|
|
|
volumes:
|
|
pg_data:
|
|
redis_data:
|