modify the Dockerfile

pull/59/head
hyh123a 2021-08-05 10:35:15 +08:00
parent 8a0617922a
commit 35d9ea4a02
4 changed files with 10 additions and 9 deletions

1
admin/Dockerfile vendored
View File

@ -8,4 +8,5 @@ RUN rm /etc/nginx/conf.d/default.conf && \
# copy the config and web codes
COPY nginx.conf /etc/nginx/
COPY . /usr/share/nginx/admin
EXPOSE 8001
CMD ['nginx', '-c /etc/nginx/nginx.conf', '-g "daemon off;"']

View File

@ -3,31 +3,28 @@ services:
api:
build: ./myems-api
command: gunicorn app:api -b 0.0.0.0:8000
network_mode: "host"
restart: always
ports:
- "8000:8000"
aggregation:
build: ./myems-aggregation
command: python main.py
network_mode: "host"
restart: always
cleaning:
build: ./myems-cleaning
command: python main.py
network_mode: "host"
restart: always
modbus_tcp:
build: ./myems-modbus-tcp
command: python main.py
network_mode: "host"
restart: always
normalization:
build: ./myems-normalization
command: python main.py
network_mode: "host"
restart: always
admin:
@ -35,13 +32,14 @@ services:
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
healthcheck:
test: [ "CMD","nginx","-t" ]
network_mode: "host"
restart: always
ports:
- "8001:8001"
web:
build: ./web
command: nginx -c /etc/nginx/nginx.conf -g "daemon off;"
healthcheck:
test: [ "CMD","nginx","-t" ]
network_mode: "host"
restart: always
restart: always
ports:
- "80:80"

View File

@ -3,4 +3,5 @@ WORKDIR /code
COPY . /code
RUN pip install -r requirements.txt
EXPOSE 8000
CMD ['gunicorn', 'app:api', '-b 0.0.0.0:8000']

1
web/Dockerfile vendored
View File

@ -10,4 +10,5 @@ RUN rm /etc/nginx/conf.d/default.conf && \
# You should run 'npm run build' in the web direction to generate the build direction because this's a react projection.
COPY nginx.conf /etc/nginx/
COPY . /usr/share/nginx/web
EXPOSE 80
CMD ['nginx', '-c /etc/nginx/nginx.conf', '-g "daemon off;"']