Skip to content

Commit 4db19c6

Browse files
committed
feat: Docker Compose
1 parent f19a4f5 commit 4db19c6

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

compose.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: '3.8'
2+
3+
services:
4+
md-chat:
5+
image: ghcr.io/mikndotdev/chat:latest
6+
container_name: md-chat
7+
ports:
8+
- "3000:80"
9+
environment:
10+
LOGTO_APP_ID: "YOUR_LOGTO_APP_ID"
11+
LOGTO_APP_SECRET: "YOUR_LOGTO_APP_SECRET"
12+
LOGTO_ENDPOINT: "https://(your-logto-instance).logto.io"
13+
LOGTO_COOKIE_SECRET: "a-very-long-and-random-secret-string-for-cookies"
14+
DATABASE_URL: "postgres://chatuser:chatpassword@db:5432/chatdb"
15+
REDIS_URL: "redis://:redispassword@redis:6379/0"
16+
S3_ENDPOINT: "http://minio:9000"
17+
S3_ACCESS_KEY_ID: "minio_access_key"
18+
S3_SECRET_ACCESS_KEY: "minio_secret_key"
19+
S3_BUCKET_NAME: "mdchat-bucket"
20+
S3_REGION: "us-east-1"
21+
S3_UPLOAD_DIR: "uploads"
22+
S3_PUBLIC_URL: "http://localhost:9000/mdchat-bucket/"
23+
depends_on:
24+
- db
25+
- redis
26+
- minio
27+
networks:
28+
- app-network
29+
30+
db:
31+
image: postgres:15-alpine
32+
container_name: chat_db
33+
environment:
34+
POSTGRES_DB: chatdb
35+
POSTGRES_USER: chatuser
36+
POSTGRES_PASSWORD: chatpassword
37+
volumes:
38+
- postgres_data:/var/lib/postgresql/data
39+
networks:
40+
- app-network
41+
42+
redis:
43+
image: redis:7-alpine
44+
container_name: chat_redis
45+
environment:
46+
REDIS_PASSWORD: redispassword
47+
command: redis-server --requirepass redispassword
48+
volumes:
49+
- redis_data:/data
50+
networks:
51+
- app-network
52+
53+
minio:
54+
image: quay.io/minio/minio:latest
55+
container_name: chat_minio
56+
ports:
57+
- "9000:9000"
58+
- "9001:9001"
59+
environment:
60+
MINIO_ROOT_USER: minio_access_key
61+
MINIO_ROOT_PASSWORD: minio_secret_key
62+
MINIO_BROWSER: "on"
63+
command: server /data --console-address ":9001"
64+
volumes:
65+
- minio_data:/data
66+
networks:
67+
- app-network
68+
69+
volumes:
70+
postgres_data:
71+
redis_data:
72+
minio_data:
73+
74+
networks:
75+
app-network:
76+
driver: bridge

0 commit comments

Comments
 (0)