Skip to content

Commit af65133

Browse files
add a local setup docker compose
1 parent b51a902 commit af65133

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docker-compose.local.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
version: "3"
2+
3+
services:
4+
db:
5+
container_name: db
6+
image: postgres:14
7+
environment:
8+
POSTGRES_PASSWORD: ${DB_PASSWORD}
9+
networks:
10+
- app_network
11+
ports:
12+
- "${DB_PORT}:${DB_PORT}"
13+
volumes:
14+
- ./db/docker-entrypoint-initdb.d/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
15+
16+
graphql-engine:
17+
container_name: graphql
18+
image: hasura/graphql-engine:v2.40.0
19+
depends_on:
20+
- "db"
21+
restart: always
22+
environment:
23+
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/fileonchain
24+
HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
25+
HASURA_GRAPHQL_DEV_MODE: "true"
26+
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
27+
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
28+
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: visitor
29+
HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES: "true"
30+
networks:
31+
- app_network
32+
ports:
33+
- "8080:8080"
34+
command:
35+
- graphql-engine
36+
- serve
37+
38+
smtp:
39+
container_name: smtp
40+
image: mailhog/mailhog
41+
networks:
42+
- app_network
43+
ports:
44+
- "1025:1025" # SMTP server
45+
- "8025:8025" # Web UI
46+
47+
networks:
48+
app_network:
49+
driver: bridge

0 commit comments

Comments
 (0)