Old Websites Repo Setup (using Docker)

Preliminary Notes

Similarly to the new websites repo, in the old repo, we now 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 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.

Building the container image

First clone the repository:

git clone https://pagure.io/fedora-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 old-fedora-websites .

This will generate a container image for you to use.

Getting things running

You can either start a shell inside the container and work from there:

$ sudo docker run -it --rm -v "$(pwd):/opt/oldrepo/:z" -p 5000:5000 old-fedora-websites
[root@7847061d786f oldrepo]# cd alt.fedoraproject.org/
[root@7847061d786f alt.fedoraproject.org]# make clean en test
rm -rf out
rm -f po/*.mo
rm -f data/templates/translations.html
  1. Or you can execute commands individually without starting a shell:

$ sudo docker run -it --rm -v "$(pwd):/opt/oldrepo/:z" -p 5000:5000 -w /opt/oldrepo/alt.fedoraproject.org old-fedora-websites clean make en testfg

If doing things the second way, remember to change the -w flag to point to the site you want to work on. Also remember to use make testfg instead of make test to force the development server to stay in the foreground…​ Otherwise the container will exit immediately and you won’t be able to access the site.

You may now go to http://localhost:5000/ in your browser of choice.

You’ll have to run make <langcode> again to rebuild each time you change the site. You make run make without a language code to build all languages.

These nice people helped write this page:

Rick Elrod

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