Commit graph

28 commits

Author SHA1 Message Date
Théo Lebrun
24e11d2749 docker: set WSGI processes=8 threads=1
Benchmarks tell us throughput increases linearly with processes count.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2024-12-24 16:05:03 +01:00
Lukas Joisten
1a761e98d3 Dockerfile: set environment variable $ELIXIR_ROOT
Set env variable $ELIXIR_ROOT inside the Dockerfile. That is used by
utils/index-all-repositories to know where to put repo/data directories.

With that adjustment the docker setup is working as indicated in the
README.

Fix the following error:

$ docker exec -it -e PYTHONUNBUFFERED=1 elixir-container /bin/bash -c \
  'export "PATH=/usr/local/elixir/venv/bin:$PATH" ; /usr/local/elixir/utils/index-all-repositories'
Error: ELIXIR_ROOT environment variable not set
It's where Elixir data are stored
2024-12-02 18:14:27 +01:00
Franciszek Stachura
5e8eb77912 Migrate from bsddb3 to berkeleydb
Following official documentation, move away from bsddb3 to berkeleydb.
https://www.jcea.es/programacion/pybsddb.htm

Main change: key and values are now bytes and not strings.

The code diff is really simple because all operations on keys/values is
done from elixir/data.py and that works fine with both bytes and
strings (it does explicit casting).
2024-11-07 16:55:14 +01:00
Franciszek Stachura
6b47af27a7 README, Dockerfile: Update to support version in footer 2024-11-06 17:18:07 +01:00
Franciszek Stachura
6e01f3b023 Dockerfile: update to support WSGI Elixir
* Build bsddb in a separate stage to avoid using system packages in venv
* Update Docker Apache config to support WSGI
2024-08-27 11:33:19 +02:00
Franciszek Stachura
22c1d7646d Remove custom ctags version from Dockerfile
As mentioned in 8ffb3d9, required changes were merged into upstream.

Version packaged for Debian 12 seems to contain these changes.
Ubuntu 22.04 mentioned in commit description is based on Debian 12.
universal-ctags has the same version string in both repos.

https://packages.debian.org/bookworm/amd64/universal-ctags
https://packages.ubuntu.com/jammy/universal-ctags
2024-08-05 15:17:23 +02:00
Franciszek Stachura
3714430aef Remove 'HttpProtocolOptions Unsafe' apache.conf insertion from Dockerfile
* Also remove mention of 'HttpProtocolOptions Unsafe' from README
2024-08-05 15:15:57 +02:00
Franciszek Stachura
ffe8d79c40 Simplify and refactor Dockerfile
* Remove repository indexing from Dockerfile
* Copy Elixir code from the context instead of cloning it from Github
* Move Dockerfile from docker/debian/Dockerfile to docker/Dockerfile
* Add docs for the new Dockerfile
* Add an utility script that allows easier repository configuration
* Add .dockerignore
* Use relative paths in Docker section in README
2024-08-05 14:54:03 +02:00
Théo Lebrun
c8bcfc8306 docker: Fix debian/Dockerfile filepath and README doc
Two things get fixed here:

 - README says downloading Dockerfile is enough. It is not; Debian
   Dockerfile requires docker/debian/000-default.conf file.

 - docker/debian/Dockerfile links to 000-default.conf file using:

      COPY ./docker/debian/000-default.conf /etc/apache2/sites-available/000-default.conf

   This means following command in README cannot work:

      docker build [...] .

   Either you set cwd to root Git repo and Dockerfile is not found, or
   you set cwd to docker/debian/ and 000-default.conf is not found.
   Correct command would be:

      docker build -f docker/debian/Dockerfile [...] .

We fix Dockerfile by expecting 000-default.conf to be in cwd. We fix
README by rewording the paragraph and updating commands to work based
on Git repo root directory.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
2024-04-29 12:36:54 +02:00
Michael Opdenacker
834806ea5b Drop obsolete CentOS Dockerfile
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2024-04-29 12:35:08 +02:00
Franciszek Stachura
051218622e Fix pygments installation 2023-12-14 10:13:11 +01:00
Franciszek Stachura
4bea126f6f Fix and refactor Debian Dockerfile
* Pin base version to debian:bookworm
* Install falcon with apt
* Use pipx to install Pygments, since global package installation with
  pip is not supported anymore
* Add elixir-data to git safe directories so that git ran from script.sh
  stops complaining
* Update repo permissions so that git ran from the cgi script stops
  complaining
* Move apache configuration to an external file for better readability
2023-12-08 09:46:28 +01:00
Michael Opdenacker
26a47b6111 Use git "bare" cloning in README.adoc and Dockerfile(s)
This saves storage space

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2023-05-05 10:27:00 +02:00
Maxime Chretien (MixLeNain)
73df02f07a docker: debian: Use pip3 version of falcon instead of debian package
The debian package is outdated so tests fail.

Signed-off-by: Maxime Chretien (MixLeNain) <mchretien@linuxmail.org>
2020-11-09 11:59:00 +01:00
Maxime Chretien (MixLeNain)
ac8b65a36d docker: use rh-git218 package instead of git in centos
This allows to have git 2.18 instead of git 1.8 and is needed for tests

Signed-off-by: Maxime Chretien (MixLeNain) <mchretien@linuxmail.org>
2020-10-30 15:58:04 +01:00
Maxime Chretien (MixLeNain)
9ec7cf5b2e docker : Add symlink for pytest and dummy git config
Also add perl test packages to centos

Signed-off-by: Maxime Chretien (MixLeNain) <mchretien@linuxmail.org>
2020-10-30 13:13:44 +01:00
Maxime Chretien (MixLeNain)
db45f2f9de docker: Execute update.py with unbuffered output
This allows to have real time logging while building the database.

Signed-off-by: Maxime Chretien (MixLeNain) <mchretien@linuxmail.org>
2020-10-24 12:16:18 +02:00
Maxime Chretien
8e7691d091 docker: Update CentOS dockerfile
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-07-02 16:29:00 +02:00
Maxime Chretien
06fd537621 docker: Add missing dependencies for debian
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-07-02 12:03:36 +02:00
Maxime Chretien
82be89b0a6 docker: Update debian Dockerfile
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-29 10:23:44 +02:00
Michael Opdenacker
138a1f03c3 Fix syntax error in Debian Docker file
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-11-05 18:04:36 +01:00
Michael Opdenacker
b358535aaa Documentation and Docker file updates
- According to the new REST API

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-10-16 09:08:16 +02:00
Michael Opdenacker
65783e715a Improve Docker scripts to support any project
- Great for testing Elixir on smaller projects

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-09-23 20:11:40 +02:00
David Southwick
0173cfe446 commit correct dockerfile this time 2019-07-27 16:07:47 +02:00
David Southwick
25610b1d58 new centos7 apache2.4 python 3.6.8 2019-07-27 16:02:25 +02:00
Michael Opdenacker
23a0419a14 Move Debian Docker file
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-07-18 08:08:52 +02:00
Michael Opdenacker
fd81603a4e Update URLs
- In particular the GitHub URL for the project

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2018-07-18 08:23:27 +02:00
darx0r
a6a9d0143f * Elixir Dockerfile based on debian with ARG of git URL of project to index (usually linux kernel) 2017-07-12 22:40:07 +03:00