-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 943 Bytes
/
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
version: '3.8'
services:
nginx:
image: nginx:latest
container_name: nginx_c
ports:
- "8000:8080"
volumes:
- ./runtime/upload/images:/src/images
- ./compose/nginx:/etc/nginx/conf.d
depends_on:
- web
networks:
- ginnetwork
web:
build:
context: .
dockerfile: compose/gin/Dockerfile
container_name: web_c
depends_on:
- db
expose:
- "8080"
networks:
- ginnetwork
db:
image: "mysql:latest"
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootroot
MYSQL_DATABASE: gindb
MYSQL_USER: baird
MYSQL_PASSWORD: sjh7895123
container_name: db_c
volumes:
- ./compose/mysql:/docker-entrypoint-initdb.d
networks:
- ginnetwork
ports:
- "3306:3306"
networks:
ginnetwork:
name: ginnetwork
driver: bridge