forked from llinsss/payCrypt_v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (72 loc) · 2.02 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (72 loc) · 2.02 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
# Full local development stack for the Tagg@d backend.
#
# Quick start:
# cp backend/.env.example backend/.env
# docker-compose up
#
# This brings up Postgres, Redis and the backend API with hot reload
# (nodemon + a bind mount of ./backend). Database migrations run
# automatically on backend startup (see backend/server.js).
#
# Bull Board (the queue admin UI) is served by the backend process itself at
# /admin/running-queues — it's exposed on its own host port (3001) below in
# addition to the main API port (3000) purely for convenience, since it's
# not a separate service in this codebase.
services:
postgres:
image: postgres:14
environment:
POSTGRES_DB: ${DB_NAME:-taggedpay}
POSTGRES_USER: ${DB_USER:-taggedpay_user}
POSTGRES_PASSWORD: ${DB_PASSWORD:-taggedpay_password}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-taggedpay_user} -d ${DB_NAME:-taggedpay}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
env_file:
- backend/.env
environment:
NODE_ENV: development
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${DB_NAME:-taggedpay}
DB_USER: ${DB_USER:-taggedpay_user}
DB_PASSWORD: ${DB_PASSWORD:-taggedpay_password}
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_URL: redis://redis:6379
ports:
- "3000:3000" # API
- "3001:3000" # Bull Board UI — see note above
volumes:
- ./backend:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
postgres-data:
redis-data: