-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (94 loc) · 2.72 KB
/
Copy pathdocker-compose.yml
File metadata and controls
98 lines (94 loc) · 2.72 KB
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
services:
postgres:
image: postgres:15
container_name: amarshop-postgres
restart: unless-stopped
ports:
- "5433:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: amarshop
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: amarshop-redis
restart: unless-stopped
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: amarshop-backend
restart: unless-stopped
ports:
- "4000:4000"
environment:
DATABASE_URL: postgresql://postgres:${DB_PASSWORD:-postgres}@postgres:5432/amarshop?schema=public
JWT_SECRET: ${JWT_SECRET}
PORT: 4000
NODE_ENV: production
REDIS_HOST: redis
REDIS_PORT: 6379
BKASH_USERNAME: ${BKASH_USERNAME}
BKASH_PASSWORD: ${BKASH_PASSWORD}
BKASH_APP_KEY: ${BKASH_APP_KEY}
BKASH_APP_SECRET: ${BKASH_APP_SECRET}
BKASH_PK: ${BKASH_PK}
BKASH_CALLBACK_URL: ${BKASH_CALLBACK_URL}
NAGAD_MERCHANT_ID: ${NAGAD_MERCHANT_ID}
NAGAD_MERCHANT_SECRET: ${NAGAD_MERCHANT_SECRET}
NAGAD_CALLBACK_URL: ${NAGAD_CALLBACK_URL}
SSLCOMMERZ_STORE_ID: ${SSLCOMMERZ_STORE_ID}
SSLCOMMERZ_STORE_PASSWORD: ${SSLCOMMERZ_STORE_PASSWORD}
SSLCOMMERZ_SANDBOX: ${SSLCOMMERZ_SANDBOX}
SSLCOMMERZ_SUCCESS_URL: ${SSLCOMMERZ_SUCCESS_URL}
SSLCOMMERZ_FAIL_URL: ${SSLCOMMERZ_FAIL_URL}
SSLCOMMERZ_CANCEL_URL: ${SSLCOMMERZ_CANCEL_URL}
SSLCOMMERZ_IPN_URL: ${SSLCOMMERZ_IPN_URL}
COOKIE_SECRET: ${COOKIE_SECRET}
CORS_ORIGINS: ${CORS_ORIGINS}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/api/v1/metrics"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build:
context: .
dockerfile: Dockerfile
container_name: amarshop-frontend
restart: unless-stopped
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: http://backend:4000/api/v1
NODE_ENV: production
depends_on:
- backend
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
pgdata: