-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (53 loc) · 1.14 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
services:
2am-nestkit:
image: node:20
user: "root"
working_dir: /home/node/app
environment:
- NODE_ENV=development
volumes:
- .:/home/node/app
networks:
- nestkit
depends_on:
- app-mysql
command: >
bash -c "cp .env.docker.example .env.testing && npm install && npm i -g @nestjs/cli && tail -f /dev/null"
tty: true
restart: none
ports:
- '3000:3000'
app-mysql:
image: 'mysql/mysql-server:8.0'
restart: always
container_name: app-mysql
environment:
MYSQL_DATABASE: 'nestkit'
MYSQL_USER: '2am'
MYSQL_PASSWORD: '2am-nestkit'
MYSQL_ROOT_PASSWORD: '2am-nestkit'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
command: |
mysqld --default-authentication-plugin=mysql_native_password
ports:
- '3307:3306'
volumes:
- 'mysql:/var/lib64/mysql'
expose:
- '3307'
networks:
- nestkit
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-p${MYSQL_ROOT_PASSWORD}'
retries: 3
timeout: 5s
volumes:
mysql:
driver: local
networks:
nestkit:
driver: bridge