forked from hasura/hasura-ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
94 lines (89 loc) · 3.45 KB
/
docker-compose.yaml
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
version: "3.6"
services:
postgres:
image: postgres:13
restart: always
volumes:
- hasura_ci_db_data:/var/lib/postgresql/data
ports:
# Expose the port for tooling (SQL language server in IDE, connecting with GUI's etc)
- 5432:5432
environment:
POSTGRES_PASSWORD: postgrespassword
graphql-engine:
image: hasura/graphql-engine:v2.0.0-beta.2.cli-migrations-v2
volumes:
- ./hasura/migrations:/hasura-migrations
- ./hasura/metadata:/hasura-metadata
ports:
- 8060:8080
depends_on:
- "postgres"
restart: always
environment:
NEXTJS_SERVER_URL: http://nextjs:3000
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
## 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_ADMIN_SECRET: my-secret
HASURA_GRAPHQL_JWT_SECRET: '{ "type": "HS256", "key": "this-is-a-generic-HS256-secret-key-and-you-should-really-change-it" }'
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
nextjs:
build:
context: ./www
dockerfile: Dockerfile
restart: always
volumes:
- ./www:/app/
- /app/node_modules
- /app/.next
ports:
- 3000:3000
environment:
NEXT_PUBLIC_HASURA_URL_SERVERSIDE: http://graphql-engine:8080
NEXT_PUBLIC_HASURA_URL_CLIENTSIDE: http://localhost:8060
HASURA_ADMIN_SECRET: my-secret
HASURA_JWT_SECRET_TYPE: HS256
HASURA_JWT_SECRET_KEY: this-is-a-generic-HS256-secret-key-and-you-should-really-change-it
S3_SERVER_URL: http://minio:9000
S3_ACCESS_KEY: minio
S3_SECRET_ACCESS_KEY: minio123
# Bucket name where all images should be uploaded and stored
# [NOTE] The following rules apply for naming S3 buckets:
# Bucket names must be between 3 and 63 characters long.
# Bucket names can consist only of lowercase letters, numbers, dots (.), and hyphens (-).
# Bucket names must begin and end with a letter or number.
S3_BUCKET_NAME: site-images
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_PUBLISHABLE_KEY: ${STRIPE_PUBLISHABLE_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
# MinIO is an OSS self-hosted S3 compatible object storage platform (See: https://github.com/minio/minio)
# It works with all standard S3 client libraries, and comes with an admin GUI to manage the stored files
#
# You can access the admin panel at http://localhost:9000/minio/login after starting the service
#
# (The "Access Key" is MINIO_ROOT_USER, and "Secret Key" is MINIO_ROOT_PASSWORD)
# (So you can login with "minio:minio123" as credentials)
#
# It is used to generate presigned image upload/download urls for the frontend (this is done via Hasura Action REST API handlers in Next.js)
minio:
image: minio/minio:RELEASE.2021-06-17T00-10-46Z
volumes:
- minio_data:/data
ports:
- 9000:9000
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
volumes:
minio_data:
hasura_ci_db_data: