Preconfigured Docker Compose versionWe have created convenient Docker images for both the web server and the database. Both images are available at Docker Hub. Refer to Docker installation for installation instructions for different operating systems. Once you have Docker installed in your host machine, you can quickly set up a SVOcat service by using the next docker compose file: services: web: image: opensvo/svocat:web-2.2 container_name: svocat-web ports: - "8080:80" volumes: - /your/path/to/catalogue/data/files:/data depends_on: - db db: image: opensvo/svocat:db-2.2 container_name: svocat-db restart: always environment: MARIADB_ROOT_PASSWORD: changeme MARIADB_DATABASE: vocats volumes: - /your/path/to/host/db/directory:/var/lib/mysql user: <uid>:<gid> In order to use this docker compose configuration, create a file with this content and call it:
> id
Once you have configured the file at your convenience, you can run the server executing:
> docker compose up
If everything starts ok, you can stop the server (CTRL-C) and run subsequent executions with --detach option to leave the server running in background:
> docker compose up --detach
This will create and run two containers: svocat-db and svocat-web, and the web service will be available at port 8080 (this is configured in the docker-compose.yaml file).
IMPORTANT! By default, a user called catuser is created in the DB, with password as catp@ss. You are encouraged to change it by connecting to the DB container and running:
> docker exec -it svocat-db bash
# mariadb -u root -p MariaDB> SET PASSWORD FOR 'catuser'@'%' = PASSWORD('whatever'); In svocat-web container you will find a directory called /data, where the data files of your machine under /your/path/to/catalogue/data/files will be available for ingestion. In order to connect to the container and perform the ingestions, just execute:
> docker exec -it svocat-web bash
The ingestion is done as explained in the section Example, with minor changes to the command, consisting in adding -h svocat-db to specify the db server name. For example:
> cd /data
> mysql -h svocat-db -u catuser -p vocats < create_table.my
|