-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
134 lines (126 loc) · 2.9 KB
/
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
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
126
127
128
129
130
131
132
133
134
services:
postgres:
image: postgres:15.3
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432"
volumes:
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
- postgresql:/var/lib/postgresql/data
networks:
- cinema_network
backend:
build:
context: ./backend-go
dockerfile: Dockerfile
environment:
POSTGRES_HOST: postgres
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
REDIS_HOST: redis
POSTGRES_DB: ${POSTGRES_DB}
SECRET_KEY: ${SECRET_KEY}
ports:
- "8080:8080"
restart: on-failure
depends_on:
- postgres
networks:
- cinema_network
web:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "80:5173"
container_name: frontend
working_dir: /home/bun/app
volumes:
- ./frontend:/home/bun/app
- /home/bun/app/node_modules
expose:
- "5173"
restart: on-failure
depends_on:
- backend
networks:
- cinema_network
redis:
image: bitnami/redis:latest
container_name: redis
# ports:
# - 6379:6379
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redis:/bitnami/redis/data
networks:
- cinema_network
jaeger:
image: jaegertracing/all-in-one:1.56
container_name: jaeger
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
ports:
- "16686:16686"
- "4318:4318"
restart: unless-stopped
networks:
- cinema_network
deploy:
resources:
limits:
cpus: '0.5'
memory: 400M
netdata:
image: netdata/netdata
container_name: netdata
pid: host
network_mode: host
restart: unless-stopped
cap_add:
- SYS_PTRACE
- SYS_ADMIN
security_opt:
- apparmor:unconfined
volumes:
- netdataconfig:/etc/netdata
- netdatalib:/var/lib/netdata
- netdatacache:/var/cache/netdata
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /etc/localtime:/host/etc/localtime:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
- /var/log:/host/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
deploy:
resources:
limits:
cpus: '0.5'
memory: 400M
# nginx:
# image: nginx:latest
# container_name: nginx
# ports:
# - "80:80"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/sites_enabled/cieu/nginx.conf
# - ./frontend:/usr/share/nginx/html
# networks:
# - cinema_network
volumes:
postgresql:
netdataconfig:
netdatalib:
netdatacache:
redis:
networks:
cinema_network:
driver: bridge