Skip to content

Commit

Permalink
[mod] hasura docker image (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
大浦 翼 committed May 29, 2023
1 parent df17b41 commit 6a97c41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .docker/hasura.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM hasura/graphql-engine:latest
FROM hasura/graphql-engine:latest.cli-migrations-v3
WORKDIR /hasura
RUN curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
RUN apt install postgresql-client
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ services:
POSTGRES_USER: seeds
POSTGRES_PASSWORD: password
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5

seeds_api:
build: ./api
Expand All @@ -33,10 +38,15 @@ services:
volumes:
- ./hasura:/hasura
environment:
HASURA_GRAPHQL_MIGRATIONS_DIR: /hasura/migrations
HASURA_GRAPHQL_METADATA_DIR: /hasura/metadata
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DATABASE_URL: postgres://seeds:password@seeds_db:5432/myapp_development
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
depends_on:
seeds_db:
condition: service_healthy

seeds_view:
build: ./view
Expand Down

0 comments on commit 6a97c41

Please sign in to comment.