-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
38 lines (36 loc) · 919 Bytes
/
docker-compose.yml
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
version: "3"
services:
web:
container_name: web
build:
context: .
dockerfile: ./apps/web/Dockerfile
restart: always
ports:
- 3000:3000
networks:
- app_network
environment:
- DATABASE_URL=${DATABASE_URL}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- NEXT_BG_TASK_URL=${NEXT_BG_TASK_URL}
- NEXT_BG_TASK_KEY=${NEXT_BG_TASK_KEY}
background-job:
container_name: background-job
build:
context: .
dockerfile: ./apps/background-job/Dockerfile
restart: always
ports:
- 3001:3001
networks:
- app_network
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- NEXT_BG_TASK_KEY=${NEXT_BG_TASK_KEY}
# Define a network, which allows containers to communicate
# with each other, by using their container name as a hostname
networks:
app_network:
external: true