-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
97 lines (95 loc) · 2.05 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
version: '3.17'
services:
bot:
build:
context: ./bot
dockerfile: Dockerfile
networks:
my_network:
ipv4_address: 192.168.1.10
depends_on:
- nginx-service
- redis
- mongo-db
ports:
- "2005:2005"
restart: always
environment:
MONGO_HOST: ${MONGO_HOST}
ISSUE_SSL: ${ISSUE_SSL}
LONG_GOOD_SECRET_KEY: ${LONG_GOOD_SECRET_KEY}
ROOT_PASSWORD: ${ROOT_PASSWORD}
MONGO_USERNAME: ${MONGO_USERNAME}
MONGO_PASSWORD: ${MONGO_PASSWORD}
MONGO_PORT: ${MONGO_PORT}
MONGO_DB_NAME: ${MONGO_DATABASE}
BOT_TOKEN: ${BOT_TOKEN}
DOMAIN: ${DOMAIN}
volumes:
- nginx-certs:/nginx-certs
nginx-service:
build:
context: ./nginx-service
dockerfile: Dockerfile
args:
DOMAIN: ${DOMAIN}
ports:
- "443:443"
- "80:80"
volumes:
- nginx-certs:/nginx-certs
restart: always
networks:
my_network:
ipv4_address: 192.168.1.20
redis:
image: redis:latest
restart: always
networks:
my_network:
ipv4_address: 192.168.1.111
ports:
- "6379:6379"
environment:
- REDIS_MAXMEMORY=100mb
typescript-app:
build:
context: ./typescript-app
dockerfile: Dockerfile
args:
DOMAIN: ${DOMAIN}
environment:
DOMAIN: ${DOMAIN}
networks:
my_network:
ipv4_address: 192.168.1.30 # Adjust the IP address as needed
depends_on:
- bot
restart: always
ports:
- "3000:3000"
mongo-db:
image: mongo:latest
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
restart: always
networks:
my_network:
ipv4_address: 192.168.1.50
networks:
my_network:
driver: bridge
ipam:
driver: default
config:
- subnet: 192.168.1.0/24
volumes:
mongo-data:
driver: local
nginx-certs: