-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
119 lines (114 loc) · 3.09 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
services:
database:
image: mysql
container_name: radash_database
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
volumes:
- ./mysql_data:/var/lib/mysql
restart: always
freeradius:
image: "freeradius/freeradius-server:latest-alpine"
container_name: radash_freeradius
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- RADIUS_SECRET=${RADIUS_SECRET}
ports:
- "1812-1813:1812-1813/udp"
volumes:
- ./freeradius/raddb:/etc/freeradius
depends_on:
- database
restart: always
redis:
image: redis:alpine
container_name: radash_redis
ports:
- 6379:6379
restart: always
radius_reload:
image: python:alpine
container_name: radash_reload
build:
context: ./radius_reload
dockerfile: Dockerfile
volumes:
- ./radius_reload:/app
environment:
- DATABASE_HOST=database
- DATABASE_PORT=3306
- DATABASE_USER=${MYSQL_USER}
- DATABASE_PASSWORD=${MYSQL_PASSWORD}
- DATABASE_NAME=${MYSQL_DATABASE}
depends_on:
- database
- freeradius
restart: always
api:
image: node:alpine
container_name: radash_api
build:
context: ./api
dockerfile: Dockerfile
target: ${NODE_ENV}
ports:
- "3009:3009"
volumes:
- ./api:/usr/src/app
- /usr/src/app/node_modules
environment:
- NODE_ENV=${NODE_ENV}
- RADIUS_SECRET=${RADIUS_SECRET}
- TIMEZONE_IANA=${TIMEZONE_IANA}
- TIMEZONE=${TIMEZONE}
- DATABASE_HOST=database
- DATABASE_PORT=3306
- DATABASE_USER=${MYSQL_USER}
- DATABASE_PASSWORD=${MYSQL_PASSWORD}
- DATABASE_NAME=${MYSQL_DATABASE}
- REDIS_HOST=redis
- REDIS_PORT=6379
- EMAIL_ADDRESS=${EMAIL_ADDRESS}
- EMAIL_PASSWORD=${EMAIL_PASSWORD}
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_PORT=${EMAIL_PORT}
- AFRICAS_TALKING_API_KEY=${AFRICAS_TALKING_API_KEY}
- AFRICAS_TALKING_USERNAME=${AFRICAS_TALKING_USERNAME}
- AFRICAS_TALKING_SENDER_ID=${AFRICAS_TALKING_SENDER_ID}
- MPESA_CONSUMER_KEY=${MPESA_CONSUMER_KEY}
- MPESA_SECRET_KEY=${MPESA_SECRET_KEY}
- MPESA_PAYBILL=${MPESA_PAYBILL}
- MPESA_PASSKEY=${MPESA_PASSKEY}
- JWT_SECRET=${JWT_SECRET}
- DASHBOARD_API_KEY=${DASHBOARD_API_KEY}
- DASHBOARD_URL=${DASHBOARD_URL}
depends_on:
- database
- redis
restart: always
dashboard:
image: node:alpine
container_name: radash_dashboard
build:
context: ./dashboard
dockerfile: Dockerfile
target: ${NODE_ENV}
ports:
- "3000:3000"
volumes:
- ./dashboard:/app
- /app/node_modules
environment:
- NODE_ENV=${NODE_ENV}
- NEXT_PUBLIC_API_URL=http://api:3009
- API_KEY=${DASHBOARD_API_KEY}
- NEXTAUTH_SECRET=${JWT_SECRET}
- NEXTAUTH_URL=${DASHBOARD_URL}
depends_on:
- api
restart: always