forked from abdellaui/GreaterWMS
-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
86 lines (86 loc) · 2.33 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
77
78
79
80
81
82
83
84
85
86
version: '3.9'
networks:
basic:
services:
front:
# build:
# context: ./
# dockerfile: ./docker/front/Dockerfile
container_name: greaterwms_front
image: greaterwms/greaterwms_front:latest
restart: always
ports:
- '8080:8080'
volumes:
- ./templates:/GreaterWMS/templates:rw
- ./web_start.sh:/GreaterWMS/templates/webstart.sh
command:
- /bin/bash
- -c
#- "yarn install --force"
- |
bash /GreaterWMS/templates/webstart.sh
networks:
- basic
backend:
# build:
# context: ./
# dockerfile: ./docker/backend/Dockerfile
container_name: greaterwms_backend
image: greaterwms/greaterwms_backend:latest
restart: always
volumes:
- ./:/GreaterWMS/:rw #将前目录挂载到容器下
- ./supervisord.conf:/etc/supervisor/supervisord.conf
ports:
- '8000:8000'
environment:
PYTHONUNBUFFERED: 1
command:
- /bin/bash
- -c
- |
bash backend_start.sh && /etc/init.d/supervisor start
networks:
- basic
# greaterwms-mysql:
# image: mysql:5.7
# container_name: greaterwms-mysql
# #使用该参数,container内的root拥有真正的root权限,否则,container内的root只是外部的一个普通用户权限
# #设置为true,不然数据卷可能挂载不了,启动不起
# privileged: true
# restart: always
# ports:
# - "3306:3306"
# environment:
# MYSQL_ROOT_PASSWORD: "GreaterWMS20210816"
# MYSQL_DATABASE: "greaterwms"
# TZ: Asia/Shanghai
# command:
# --wait_timeout=31536000
# --interactive_timeout=31536000
# --max_connections=1000
# volumes:
# #映射mysql的数据目录到宿主机,保存数据
# - "./docker/mysql/data:/var/lib/mysql"
# #根据宿主机下的配置文件创建容器
# - "./docker/mysql/conf.d:/etc/mysql/conf.d"
# - "./docker/mysql/logs:/logs"
# networks:
# - basic
# nginx:
# image: nginx:1.19.1
# container_name: greaterwms_nginx
# restart: always
# privileged: true
# environment:
# - TZ=Asia/Shanghai
# ports:
# - 80:80
# #- 443:443
# volumes:
# - /etc/localtime:/etc/localtime:ro
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./static_new/:/GreaterWMS/static_new:ro
# networks:
# - basic