generated from mrtousif/reddit-clone
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
113 lines (103 loc) · 3.73 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: "3"
volumes:
postgres_data:
driver: local
services:
postgres:
container_name: postgres
image: ghcr.io/mrtousif/postgres-15:a8692e4263a81aaf67e6b3e07be1d64ec4ba839d
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init/db:/docker-entrypoint-initdb.d/
command: postgres -c wal_level=logical
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
networks:
- mynetwork
hasura:
container_name: hasura
image: hasura/graphql-engine:v2.29.0
restart: unless-stopped
depends_on:
- postgres
ports:
- "6080:8080"
volumes:
- ./hasura/metadata:/hasura-metadata
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/hasura_metadata
HASURA_GRAPHQL_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
HASURA_GRAPHQL_LOG_LEVEL: warn
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_JWT_SECRET: '{ "type": "RS512", "jwk_url": "http://fusionauth:9011/.well-known/jwks" }'
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: 'true'
NESTJS_BASE_URL: ${NESTJS_BASE_URL}
NESTJS_EVENT_WEBHOOK_ENDPOINT: ${NESTJS_BASE_URL}/hasura/events
NESTJS_EVENT_WEBHOOK_SHARED_SECRET: ${NESTJS_EVENT_WEBHOOK_SHARED_SECRET}
HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT: 30
networks:
- mynetwork
# realtime:
# image: supabase/realtime:latest
# ports:
# - "8000:4000"
# environment:
# DB_HOST: postgres
# DB_NAME: ${POSTGRES_DB}
# DB_USER: ${POSTGRES_USER}
# DB_PASSWORD: ${POSTGRES_PASSWORD}
# DB_PORT: 5432
# PORT: 4000
# JWT_SECRET: SOMETHING_SUPER_SECRET
# SECURE_CHANNELS: 'false'
# depends_on:
# - postgres
# pgweb:
# container_name: pgweb
# image: sosedoff/pgweb:latest
# restart: unless-stopped
# ports:
# - "8081:8081"
# environment:
# - DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
# depends_on:
# - postgres
# networks:
# - mynetwork
redis:
image: redis:7-alpine
hostname: redis
restart: unless-stopped
ports:
- "6379:6379"
networks:
- mynetwork
maildev:
container_name: maildev
image: maildev/maildev
ports:
- "1080:1080"
- "1025:1025"
networks:
- mynetwork
networks:
mynetwork:
name: mynetwork
# http://localhost:9011/d0b51c2f-ea46-4101-a613-48def0416abc/.well-known/openid-configuration