-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (70 loc) · 2.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (70 loc) · 2.07 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
version: '3.9'
services:
redis:
image: redis:7-alpine
container_name: redis-cache
restart: unless-stopped
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD:-your_redis_password}"]
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD:-your_redis_password}", "ping"]
interval: 30s
timeout: 10s
retries: 3
car-rental:
build:
context: .
dockerfile: Dockerfile
container_name: car-rental
restart: unless-stopped
ports:
- "8000:8000"
environment:
NODE_ENV: development
PORT: 8000
# DB
DB_URL: ${DB_URL}
# Redis
REDIS_URL: redis://:your_redis_password@redis-14873.c257.us-east-1-3.ec2.redns.redis-cloud.com:14873
# JWT
JWT_ACCESS_TOKEN_SECRET: ${JWT_ACCESS_TOKEN_SECRET:-your_access_token_secret}
JWT_REFRESH_TOKEN_SECRET: ${JWT_REFRESH_TOKEN_SECRET:-your_refresh_token_secret}
JWT_VERIFICATION_TOKEN_SECRET: ${JWT_VERIFICATION_TOKEN_SECRET:-your_verification_token_secret}
JWT_ACCESS_TOKEN_EXPIRATION_TIME: 50m
JWT_REFRESH_TOKEN_EXPIRATION_TIME: 7d
JWT_RESET_TOKEN_SECRET: ${JWT_RESET_TOKEN_SECRET:-your_refresh_token_secret}
JWT_RESET_TOKEN_EXPIRATION_TIME: 1h
JWT_VERIFICATION_TOKEN_EXPIRATION_TIME: 1d
JWT_SECRET: ${JWT_SECRET:-your_verification_token_secret}
# Email
EMAIL: ${EMAIL}
PASSWORD: ${PASSWORD}
EMAIL_RESET_PASSWORD_URL: ${EMAIL_RESET_PASSWORD_URL}
# Throttle
THROTTLE_TTL: 60000
THROTTLE_LIMIT: 100
# M-Pesa
CONSUMER_KEY: ${CONSUMER_KEY}
CONSUMER_SECRET: ${CONSUMER_SECRET}
SHORTCODE: ${SHORTCODE}
PASS_KEY: ${PASS_KEY}
MPESA_CALLBACK_URL: ${MPESA_CALLBACK_URL}
depends_on:
redis:
condition: service_healthy
volumes:
- .:/app
- /app/node_modules
networks:
- app-network
volumes:
redis-data:
name: car-rental-redis-data
networks:
app-network:
driver: bridge