support podman

This commit is contained in:
Mako
2024-11-28 09:12:06 +09:00
parent 770c5d06e5
commit e1405ee7a5
7 changed files with 18 additions and 12 deletions

View File

@@ -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
View 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

View File

@@ -1,5 +0,0 @@
FROM nginx:latest
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
RUN echo "now building..."

View File

@@ -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"]

View File

@@ -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)