forked from theblockcade/stellarcade
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.04 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
version: "3.8"
services:
# PostgreSQL Database
db:
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
POSTGRES_DB: ${DB_NAME:-stellarcade}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- stellarcade-network
# Redis for Caching/Session
redis:
image: redis:7-alpine
restart: always
ports:
- "6379:6379"
networks:
- stellarcade-network
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
restart: always
environment:
- NODE_ENV=development
- PORT=3000
- DATABASE_URL=postgres://${DB_USER:-postgres}:${DB_PASSWORD:-postgres}@db:5432/${DB_NAME:-stellarcade}
- REDIS_URL=redis://redis:6379
ports:
- "3000:3000"
depends_on:
- db
- redis
networks:
- stellarcade-network
networks:
stellarcade-network:
driver: bridge
volumes:
postgres_data: