We now have documentation on using the Dockerfile which ships in the Fedora websites repository, and suggest trying that method before using the method outlined on this page. See this tutorial.

Notas Preliminares

There are some open tickets (31, 11) about getting the websites repository building on Fedora with Python 3.

However, it should be able to be built on Fedora 30, using Python 2 packages, for now.

Fedora 29 Alternativa

Note, the dependencies below may not currently resolve due to package renaming in Fedora 30. If the dependencies do not resolve in Fedora 30, running Flask from a Fedora 29 container is an alternative. An example to run the Fedora 29 container using podman is as follows:

--net=host --privileged -v /path/to/websites/repo:/path/to/websites/repo -ti ```

== Dependências

That said, assuming Fedora 30, install the dependencies as follows
footnote:[This list comes directly from the Fedora Infrastructure OpenShift
build for Websites found[here].]:

[source, bash]
dnf install \
        git \
        python-flask \
        python-frozen-flask \
        python-flask-assets \
        python-rjsmin \
        python-cssmin \
        python-flask-babel \
        python-flask-htmlmin \
        python-cssutils \
        rubygem-sass \
        babel \
        python3-jinja2 \
        python-pyyaml \
        python-dateutil \
        python-dogpile-cache \
        python-requests \

== Pull Strings

Now we need to pull the current translations. After installing the
dependencies above, you can `cd` into `sites/` and run:

Once the dependencies are installed and translations are pulled, you can do
one of two things:

== Utilizar o Servidor de Desenvolvimento

One option is to use the Flask built-in development server. This is handy
because it prevents you from needing to build the websites every time you
change something. However, it bypasses the Frozen-Flask system which creates
are static sites, entirely, so it's not entirely an accurate representation
of what goes live.

Para utilizar o servidor de desenvolvimento:

[source, bash]
flask run --reload

Now you many visit http://localhost:5000/ to get to the site.

== Utilizar Apache

Alternatively, you may simply run `python`. You'll get a statically
built site in the `./build/` directory. However, the HTML files are all
language-code-suffixed as Apache/httpd MultiViews system expects
(e.g. `index.html.en`). As a result you *cannot* just run a simple HTTP
server (like `python -m SimpleHTTPServer`) in the `./build/` directory,

You can, however, set up an Apache on your system, and point it to the
`./build/` directory.

(We should probably add an example Apache config here at some point).

These nice people helped write this page:

Rick Elrod

Want to help? Learn how to contribute to Fedora Docs.