-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
125 lines (124 loc) · 2.94 KB
/
docker-compose-dev.yml
File metadata and controls
125 lines (124 loc) · 2.94 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
services:
redis:
image: "redis:latest"
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
postgres:
image: "postgres:latest"
environment:
- POSTGRES_DB=lingput
- POSTGRES_USER=lingput
- POSTGRES_PASSWORD=cmpinputpswd
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 5
lemmas:
build:
context: ./apps/lemmas
backend:
init: true
build:
context: ./apps/backend
dockerfile: Dockerfile.dev
image: markmdev/lingput-backend
env_file:
- ./apps/backend/.env
- ./apps/backend/.env.defaults
volumes:
- /app/node_modules
- ./apps/backend:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/healthz"]
interval: 30s
timeout: 3s
retries: 3
start_period: 20s
worker:
init: true
image: "markmdev/lingput-backend"
command: sh "./worker-start-dev.sh"
env_file:
- ./apps/backend/.env
- ./apps/backend/.env.defaults
volumes:
- /app/node_modules
- ./apps/backend:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
lemmas:
condition: service_started
frontend:
build:
context: ./apps/frontend
dockerfile: Dockerfile.dev
env_file:
- ./apps/frontend/.env
volumes:
- /app/node_modules
- ./apps/frontend:/app
depends_on:
backend:
condition: service_healthy
environment:
- NEXT_PUBLIC_API_URL=http://backend:4000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
interval: 30s
timeout: 3s
retries: 3
start_period: 15s
nginx:
restart: unless-stopped
build:
context: ./nginx
dockerfile: Dockerfile.dev
ports:
- "3050:80"
depends_on:
frontend:
condition: service_healthy
backend:
condition: service_healthy
prisma-studio:
image: node:lts-alpine3.17
working_dir: /usr/src/app
volumes:
- .:/usr/src/app
command: npx prisma studio --port 5555 --browser none --schema ./apps/backend/prisma/schema.prisma
environment:
- DATABASE_URL=postgresql://lingput:cmpinputpswd@postgres:5432/lingput?schema=public
ports:
- "5555:5555"
depends_on:
postgres:
condition: service_healthy
landing:
build:
context: ./apps/landing
dockerfile: Dockerfile.dev
volumes:
- /app/node_modules
- ./apps/landing:/app
docs:
image: "nginx:alpine"
volumes:
- ./docs/api.html:/usr/share/nginx/html/index.html:ro
volumes:
pgdata: