-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-local.yaml
79 lines (72 loc) · 1.57 KB
/
docker-compose-local.yaml
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
version: '3.8'
networks:
app_network:
driver: bridge
services:
backend:
build:
context: ./apps/backend
dockerfile: Dockerfile.local
container_name: backend
environment:
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_USER=postgres
- DATABASE_PASSWORD=postgres
- DATABASE_NAME=postgres
- PORT=80
networks:
- app_network
volumes:
- ./apps/backend:/app
depends_on:
- db
- typesense
frontend:
build:
context: ./apps/frontend
dockerfile: Dockerfile.local
container_name: frontend
networks:
- app_network
db:
build:
context: ./apps/database
dockerfile: Dockerfile.local
image: postgres:15
container_name: db
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: postgres
networks:
- app_network
volumes:
- ./apps/postgres_data:/var/lib/postgresql/data
ports:
- 5432:5432
typesense:
image: typesense/typesense:27.1
restart: on-failure
container_name: typesense
environment:
- TYPESENSE_API_KEY=xyz123
- TYPESENSE_DATA_DIR=/data
networks:
- app_network
volumes:
- ./appstypesense_data:/data
command: '--data-dir /data --api-key=xyz123 --enable-cors'
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./apps/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- app_network
volumes:
postgres_data:
typesense_data: