updated docker compose files for windows host and for linux host
parent
cd6d6141d2
commit
3b694c47c2
|
@ -85,9 +85,17 @@ npm run build
|
||||||
|
|
||||||
5. 运行docker-compose命令
|
5. 运行docker-compose命令
|
||||||
|
|
||||||
|
On Windows Host:
|
||||||
```
|
```
|
||||||
cd myems
|
cd myems
|
||||||
docker-compose up -d
|
docker-compose -f docker-compose-on-windows.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux Host:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd myems
|
||||||
|
docker-compose -f docker-compose-on-linux.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
6. 验证
|
6. 验证
|
||||||
|
|
|
@ -85,9 +85,17 @@ npm run build
|
||||||
|
|
||||||
5. Befehl Docker-compose ausführen
|
5. Befehl Docker-compose ausführen
|
||||||
|
|
||||||
|
On Windows Host:
|
||||||
```
|
```
|
||||||
cd myems
|
cd myems
|
||||||
docker-compose up -d
|
docker-compose -f docker-compose-on-windows.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux Host:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd myems
|
||||||
|
docker-compose -f docker-compose-on-linux.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Verification
|
6. Verification
|
||||||
|
|
|
@ -85,9 +85,17 @@ npm run build
|
||||||
|
|
||||||
5. Run docker-compose command
|
5. Run docker-compose command
|
||||||
|
|
||||||
|
On Windows Host:
|
||||||
```
|
```
|
||||||
cd myems
|
cd myems
|
||||||
docker-compose up -d
|
docker-compose -f docker-compose-on-windows.yml up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
On Linux Host:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd myems
|
||||||
|
docker-compose -f docker-compose-on-linux.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Verification
|
6. Verification
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
api:
|
||||||
|
build: ./myems-api
|
||||||
|
command: gunicorn app:api -b 0.0.0.0:8000 --timeout 600 --workers=4
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: /upload
|
||||||
|
target: /var/www/html/admin/upload
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
|
||||||
|
aggregation:
|
||||||
|
build: ./myems-aggregation
|
||||||
|
command: python main.py
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
cleaning:
|
||||||
|
build: ./myems-cleaning
|
||||||
|
command: python main.py
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
modbus_tcp:
|
||||||
|
build: ./myems-modbus-tcp
|
||||||
|
command: python main.py
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
normalization:
|
||||||
|
build: ./myems-normalization
|
||||||
|
command: python main.py
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
admin:
|
||||||
|
build: ./admin
|
||||||
|
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD","nginx","-t" ]
|
||||||
|
volumes:
|
||||||
|
- type: bind
|
||||||
|
source: /upload
|
||||||
|
target: /var/www/html/admin/upload
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "8001:8001"
|
||||||
|
web:
|
||||||
|
build: ./web
|
||||||
|
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD","nginx","-t" ]
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
|
@ -5,9 +5,6 @@ services:
|
||||||
command: gunicorn app:api -b 0.0.0.0:8000 --timeout 600 --workers=4
|
command: gunicorn app:api -b 0.0.0.0:8000 --timeout 600 --workers=4
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
# Linux Host
|
|
||||||
# source: /upload
|
|
||||||
# Windows Host
|
|
||||||
source: c:\upload
|
source: c:\upload
|
||||||
target: /var/www/html/admin/upload
|
target: /var/www/html/admin/upload
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -41,9 +38,6 @@ services:
|
||||||
test: [ "CMD","nginx","-t" ]
|
test: [ "CMD","nginx","-t" ]
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
# Linux Host
|
|
||||||
# source: /upload
|
|
||||||
# Windows Host
|
|
||||||
source: c:\upload
|
source: c:\upload
|
||||||
target: /var/www/html/admin/upload
|
target: /var/www/html/admin/upload
|
||||||
restart: always
|
restart: always
|
Loading…
Reference in New Issue