From e806572bb4494b856933680ebdc02360ae4f671b Mon Sep 17 00:00:00 2001 From: Brandon Nielsen Date: Oct 11 2021 10:31:14 +0000 Subject: [PATCH 1/2] Update Dockerfile to fedora34. This requires updating some dependencies to their python3 package name and updating the documentation for running a local build to reflect the python3 requirement. This is basically a light touch up of PR 67[0]. [0] - https://pagure.io/fedora-web/websites/pull-request/67 --- diff --git a/Dockerfile b/Dockerfile index 814af99..9d73399 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,26 @@ -FROM fedora:29 +FROM fedora:34 WORKDIR /opt/sites/getfedora.org/ RUN dnf -y install \ git \ - python-flask \ - python-frozen-flask \ - python-flask-assets \ - python-rjsmin \ - python-cssmin \ - python-flask-babel \ - python-flask-htmlmin \ - python-cssutils \ + python3-flask \ + python3-frozen-flask \ + python3-flask-assets \ + python3-rjsmin \ + python3-cssmin \ + python3-flask-babel \ + python3-flask-htmlmin \ + python3-cssutils \ rubygem-sass \ babel \ python3-jinja2 \ - python-pyyaml \ - python-dateutil \ - python-dogpile-cache \ - python-requests \ - python-gnupg \ - python-fedfind && \ + python3-pyyaml \ + python3-dateutil \ + python3-dogpile-cache \ + python3-requests \ + python3-gnupg \ + python3-fedfind && \ dnf clean all ENV FLASK_APP main.py diff --git a/README.md b/README.md index 319edeb..4193e93 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,19 @@ Translations are handled by the Fedora [localization team](https://fedoraproject Podman is the recommended way of building fedora-websites. -From the root of the repository, run the following commands to start a local server: +From the root of the repository, run the following commands to build the necessary components: ``` podman build -t fedora-websites . podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/pull-translations.sh -podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python ./scripts/pull-magazine.py -podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python main.py +podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python3 ./scripts/pull-magazine.py +podman run -it --rm -v "$(pwd):/opt/:z" fedora-websites python3 main.py ``` + +Now we are ready to run the development server: + +``` +podman run -it --rm -v "$(pwd):/opt/:z" -p 5000:5000 fedora-websites flask run --reload --host 0.0.0.0 +``` + +You may now go to in your browser of choice. From 7375c82927820f2ad23b751129b57bfd4a5fa36e Mon Sep 17 00:00:00 2001 From: Brandon Nielsen Date: Oct 11 2021 10:31:14 +0000 Subject: [PATCH 2/2] Make docker registry explicit. --- diff --git a/Dockerfile b/Dockerfile index 9d73399..ca9a75e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM fedora:34 +FROM registry.fedoraproject.org/fedora:34 WORKDIR /opt/sites/getfedora.org/