Getting Set Up (using Docker)

Notas Preliminares

It is now easier to get started on developing the Fedora Websites with the use of Docker (or Podman).

We ship a Dockerfile which will install dependencies into an image for you, so all you are left to do is mount the site as a volume, pull translations, and start the development server.

The documentation here refers to docker, but our fairly simple use of it means that things are likely to work with podman with little modification.

Criar a imagem de ''container''

Clonar primeiro o repositório:

git clone https://pagure.io/fedora-web/websites.git

(You may instead clone your fork of it, or add your fork as a second remote later on.)

Now ensure Docker is running and run:

sudo docker build -t fedora-websites .

This will generate a container image for you to use.

Submeter traduções

Nós temos um ''script'' para submeter as traduções. Vamos chamá-lo dentro do ''container'':

sudo docker run -it --rm -v "$(pwd):/opt/:z" fedora-websites ./scripts/pull-translations.sh

Notice here that we are mounting a volume (-v) in Docker which points to our check-out of the repository. We’re referring to the fedora-websites image created above, and calling the ./scripts/pull-translations.sh script from within it.

A executar o servidor de desenvolvimento

Agora, nós estamos prontos para executar o servidor de desenvolvimento:

sudo docker run -it --rm -v "$(pwd):/opt/:z" -p 5000:5000 fedora-websites flask run --reload --host 0.0.0.0

Note that we need -p 5000:5000 so that we can access the development server from our actual host. Also notice that we need to tell Flask to listen on 0.0.0.0 as by default it listens on 127.0.0.1 which won’t be accessible outside of the container.

Agora, pode ir para http://localhost:5000/ no seu navegador preferido.

Agora, está pronto para começar e quaisquer alterações efetuadas no repositório deverão ser refletidas imediatamente após a atualização da página no seu navegador.

These nice people helped write this page:

Rick Elrod

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