mirror of
https://github.com/tex2e/rfc-translater.git
synced 2025-12-20 00:54:10 +08:00
support podman
This commit is contained in:
@@ -24,10 +24,10 @@ services:
|
||||
scraping-app:
|
||||
container_name: rfctrans-python
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: ./Dockerfile
|
||||
context: ./scraping-app
|
||||
dockerfile: Containerfile
|
||||
ports:
|
||||
- "11082:80"
|
||||
- "11082:11080"
|
||||
volumes:
|
||||
- ./main.py:/opt/app/main.py
|
||||
- ./src:/opt/app/src
|
||||
@@ -42,7 +42,9 @@ services:
|
||||
# RFC翻訳結果を閲覧するためのWebページ
|
||||
nginx:
|
||||
container_name: rfctrans-nginx
|
||||
build: ./nginx
|
||||
build:
|
||||
context: ./nginx
|
||||
dockerfile: Containerfile
|
||||
ports:
|
||||
- "11080:80"
|
||||
volumes:
|
||||
|
||||
6
nginx/Containerfile
Normal file
6
nginx/Containerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM ubi9-init
|
||||
|
||||
RUN dnf -y install nginx; dnf -y clean all
|
||||
RUN systemctl enable nginx
|
||||
|
||||
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
@@ -1,5 +0,0 @@
|
||||
FROM nginx:latest
|
||||
|
||||
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN echo "now building..."
|
||||
@@ -7,8 +7,11 @@ WORKDIR /opt/app/
|
||||
RUN adduser --disabled-login mako && chown -R mako /opt/app/
|
||||
USER mako
|
||||
|
||||
COPY requirements.txt /opt/app/
|
||||
COPY ../requirements.txt /opt/app/
|
||||
RUN pip install -r /opt/app/requirements.txt
|
||||
COPY scraping-app/exec.py /opt/app/
|
||||
COPY exec.py /opt/app/
|
||||
|
||||
EXPOSE 11080
|
||||
|
||||
CMD ["python", "exec.py"]
|
||||
#CMD ["bash"]
|
||||
@@ -40,4 +40,4 @@ def exec():
|
||||
return Response(generate(exec_cmd))
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host="0.0.0.0", port=80, debug=True)
|
||||
app.run(host="0.0.0.0", port=11080, debug=True)
|
||||
|
||||
Reference in New Issue
Block a user