-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
46 lines (44 loc) · 917 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (44 loc) · 917 Bytes
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
version: '3.8'
services:
web:
build: .
ports:
- '3000:8080'
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: 'db'
MYSQL_USER: 'admin'
MYSQL_PASSWORD: '123456'
MYSQL_ROOT_PASSWORD: '123456'
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- my-db:/var/lib/mysql
redis:
image: 'redis:alpine'
command: redis-server --requirepass sOmE_sEcUrE_pAsS
ports:
- '6379:6379'
volumes:
- $PWD/redis-data:/var/lib/redis
- $PWD/redis.conf:/usr/local/etc/redis/redis.conf
environment:
- REDIS_REPLICATION_MODE=master
- ALLOW_EMPTY_PASSWORD=yes
networks:
node_net:
ipv4_address: 172.28.1.4
# Names our volume
volumes:
my-db:
# networking for the Redis container
networks:
node_net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16