-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.31 KB
/
docker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.31 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: pushnotify_postgres
environment:
POSTGRES_DB: pushnotify
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d pushnotify"]
interval: 30s
timeout: 10s
retries: 3
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: pushnotify_backend
environment:
NODE_ENV: development
PORT: 3001
DATABASE_URL: postgresql://user:password@postgres:5432/pushnotify
env_file:
- .env.backend
ports:
- "3001:3001"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend:/app
- /app/node_modules
command: npm run dev
web:
build:
context: ./web
dockerfile: Dockerfile
container_name: pushnotify_web
environment:
REACT_APP_API_URL: http://localhost:3001
env_file:
- .env.web
ports:
- "3000:3000"
depends_on:
- backend
volumes:
- ./web:/app
- /app/node_modules
command: npm start
volumes:
postgres_data: