-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (59 loc) · 1.22 KB
/
docker-compose.yml
File metadata and controls
59 lines (59 loc) · 1.22 KB
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
version: '3.9'
networks:
crud-net:
name: crud-net
services:
crud-db:
container_name: crud-db
hostname: crud-db
image: mysql:8
restart: unless-stopped
command: --default-authentication-plugin=mysql_native_password
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=crud
- MYSQL_USER=user
- MYSQL_PASSWORD=user
working_dir: /var/lib/mysql
volumes:
# - ./apps/mysql:/var/lib/mysql
- ./sql:/docker-entrypoint-initdb.d
networks:
- crud-net
crud-api:
container_name: crud-api
hostname: crud-api
image: crud/api
restart: unless-stopped
build: ./api
ports:
- "3001:3001"
networks:
- crud-net
depends_on:
- crud-db
crud-web:
container_name: crud-web
hostname: crud-web
image: crud/web
restart: unless-stopped
build: ./web
ports:
- "3000:3000"
networks:
- crud-net
depends_on:
- crud-db
adminer:
container_name: adminer
image: adminer:latest
restart: unless-stopped
ports:
- "8080:8080"
environment:
ADMINER_DEFAULT_DB_DRIVER: mysql
ADMINER_DEFAULT_SERVER: mysql
networks:
- crud-net