OpenTermsArchive / engine

Tracks contractual documents and exposes changes to the terms of online services.
https://opentermsarchive.org
European Union Public License 1.2
111 stars 30 forks source link

Added files to run OTA engine into Docker container #1022

Closed fabianospinelli closed 7 months ago

fabianospinelli commented 1 year ago

Here the files needed to create a Docker container with the OTA engine

MattiSG commented 1 year ago

Thanks @fabianospinelli for this contribution! We will need a bit of time to review it properly 🙂

I can already mention that we will probably need the config file to be in the config directory, and that we don't want the engine to contain specific declarations. Are you embarking one for testing purposes? 🙂

fabianospinelli commented 1 year ago

Hi @MattiSG , as you can see from the Docker file, the config file will be copied into the "config" folder (as requested by the engine). The declaration could be removed, is not necessary that continue to stay, but I included only to excecute a fast test when the docker image as been built.

fabianospinelli commented 1 year ago

Hi! With the latest version of "npm" (v10.1.0) the build fails, so you need to fix a version (I use the version 9.8.0). So you need to substitute "npm install -g npm@latest" with "npm install -g npm@9.8.0"

MattiSG commented 1 year ago

Thanks for the heads up @fabianospinelli! This has been fixed by @Ndpnt in our Ansible-based deployment system in v0.0.11.

Since we do not ourselves use Docker, and do not intend to, we expect it to be your responsibility to update the Docker files if they are to be made available publicly. Could you please update this PR accordingly? 🙂

I once more recommend the use of a tool such as Packer to provision Docker images through Ansible rather than duplicating the deployment instructions specifically for Docker.