modify the Dockerfile
parent
8a0617922a
commit
35d9ea4a02
|
@ -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;"']
|
|
@ -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
|
||||
ports:
|
||||
- "80:80"
|
|
@ -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']
|
|
@ -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;"']
|
Loading…
Reference in New Issue