-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
76 lines (70 loc) · 1.56 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: "3.7"
services:
redis:
image: redis:alpine
ports:
- "6379"
volumes:
- /data/redis:/data
networks:
- blog
restart: always
container_name: blog_redis
mysql:
image: mysql:latest
ports:
- "3306"
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- /data/mysql:/var/lib/mysql
- ./backend/db.sql:/docker-entrypoint-initdb.d/db.sql
networks:
- blog
restart: always
environment:
- MYSQL_ROOT_PASSWORD=123456
container_name: blog_db
gin:
build:
context: ./backend
ports:
- "8000"
volumes:
- /data/gin/upload:/go/src/upload
networks:
- blog
depends_on:
- mysql
- redis
container_name: blog_gin
nginx:
build:
context: ./fronted
ports:
- "80:80"
- "443:443"
volumes:
- ./fronted/nginx.conf:/etc/nginx/nginx.conf
- ./fronted/nginx.vh.default.conf:/etc/nginx/conf.d/default.conf
- ./fronted/cert/poorops.com.key:/etc/nginx/poorops.com.key
- ./fronted/cert/poorops.com.pem:/etc/nginx/poorops.com.pem
networks:
- blog
depends_on:
- gin
container_name: blog_nginx
elasticsearch:
image: elasticsearch:7.4.2
ports:
- "9200"
volumes:
- /data/elasticsearch:/usr/share/elasticsearch/data
networks:
- blog
restart: always
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
container_name: blog_elasticsearch
networks:
blog: