-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
70 lines (70 loc) · 1.84 KB
/
docker-compose.dev.yaml
File metadata and controls
70 lines (70 loc) · 1.84 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
services:
redis:
container_name: gentrain-redis
image: gentrain-redis
build:
context: ./backend/redis
dockerfile: Dockerfile.dev
ports:
- ${REDIS_PORT}:${REDIS_PORT}
db:
container_name: gentrain-db
image: postgres:17
user: postgres:postgres
ports:
- ${DATABASE_PORT}:${DATABASE_PORT}
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DB=${DATABASE_NAME}
restart: unless-stopped
api:
container_name: gentrain-api
image: gentrain-api
restart: unless-stopped
build:
context: ./backend/api
dockerfile: Dockerfile.dev
ports:
- "4000:4000"
volumes:
- type: bind
source: ./backend/api
target: /api
- type: bind
source: ./backend/data
target: /api/data
- type: bind
source: ./backend/prisma/schema.prisma
target: /api/prisma/schema.prisma
depends_on:
- redis
- db
env_file: ".env"
environment:
- DATABASE_URL=${DATABASE_DRIVER}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
worker:
container_name: gentrain-worker
image: gentrain-api:latest
depends_on:
- redis
volumes:
- type: bind
source: ./backend/api
target: /api
- type: bind
source: ./backend/data
target: /api/data
- type: bind
source: ./backend/prisma/schema.prisma
target: /api/prisma/schema.prisma
environment:
- DATABASE_URL=${DATABASE_DRIVER}://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
entrypoint: "/api/workers/entrypoint.sh dev"
links:
- redis
env_file: ".env"
volumes:
postgres_data: