-
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) · 982 Bytes
/
docker-compose.yml
File metadata and controls
46 lines (44 loc) · 982 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
services:
mysql:
image: mysql:lts
container_name: mysql
restart: always
ports:
- "127.0.0.1:3306:3306"
environment:
MYSQL_ROOT_PASSWORD: your-password
volumes:
- mysql-data:/var/lib/mysql
networks:
- reservation-net
redis:
image: redis:latest
container_name: redis
restart: always
ports:
- '127.0.0.1:6379:6379'
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
- redis-data:/data
networks:
- reservation-net
command: redis-server /usr/local/etc/redis/redis.conf
reservation:
build: .
image: reservation:latest
container_name: reservation
restart: unless-stopped
ports:
- '127.0.0.1:8081:8081'
user: 1000:1000
environment:
- SPRING_PROFILES_ACTIVE=prod
networks:
- reservation-net
# 如需要覆盖默认端口
# command: --server.port=4173
volumes:
mysql-data:
redis-data:
networks:
reservation-net: