-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-local.yml
65 lines (61 loc) · 1.46 KB
/
docker-compose-local.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
version: "0.0.1"
services:
api:
build:
context: .
dockerfile: dockerfiles/Dockerfile-api
ports:
- 8080:8080
volumes:
- ./account-api/src/main/resources:/data/etc
environment:
TZ: Asia/Seoul
SPRING_PROFILES_ACTIVE: local
DB_HOST: mysql
REDIS_HOST: redis
custom.name-json: /data/etc/names/names.json
depends_on:
- mysql
ws:
build:
context: .
dockerfile: dockerfiles/Dockerfile-ws
ports:
- 8081:8081
environment:
TZ: Asia/Seoul
SPRING_PROFILES_ACTIVE: local
DB_HOST: mysql
REDIS_HOST: redis
custom.name-json: /data/etc/names/names.json
depends_on:
- mysql
mysql:
image: mysql:8.2.0
ports:
- 3306:3306
environment:
TZ: Asia/Seoul
MYSQL_ROOT_PASSWORD: admin
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
- mysql:/var/lib/mysql
- ./resources/db/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: unless-stopped
redis:
image: redis:7.2.4
expose:
- 6379
command:
- bash
- -c
- redis-server --requirepass 1234 --port 6379 --maxmemory $$(( $$( cat /sys/fs/cgroup/memory/memory.limit_in_bytes 2>/dev/null || cat /sys/fs/cgroup/memory.max ) - 100000000)) --maxmemory-policy volatile-lru
deploy:
resources:
limits:
memory: 512M
restart: always
volumes:
mysql: {}