From eeb4c14bd6c8de1252f01e04a040fc5f0af32a43 Mon Sep 17 00:00:00 2001 From: Riccardo Boero <ribo@nilu.no> Date: Tue, 7 Jan 2025 16:07:06 +0100 Subject: [PATCH] update README --- README.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c3edcf5..e0a0862 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,27 @@ Rail stations (passengers and freigth) and working rail lines in Europe and Nort --- ## Use -1. Pull the image: -> docker pull registry.git.nilu.no/fact/data/fact_rail:latest - -2. Run this data service: ->docker run -t -i --name fact_rail -e MARIADB_DATABASE=FACT_rail -e MYSQL_ROOT_PASSWORD=devops -p 3311:3306 -d registry.git.nilu.no/fact/data/fact_rail:0.1 +1. Through the command line: +```bash +docker pull registry.git.nilu.no/fact/data/fact_rail:latest +docker run -t -i --name fact_rail -e MARIADB_DATABASE=FACT_rail -e MYSQL_ROOT_PASSWORD=devops -p 3311:3306 -d registry.git.nilu.no/fact/data/fact_rail:0.1 +``` +2. Through a docker-compose file: +```yaml +version: '3.8' + +services: + fact_rail: + image: registry.git.nilu.no/fact/data/fact_rail:latest + container_name: fact_rail + environment: + MARIADB_DATABASE: FACT_rail + MYSQL_ROOT_PASSWORD: devops + ports: + - "3311:3306" + restart: unless-stopped +``` +which could be executed with `docker-compose up fact_rail -d`. The container makes available a MariaDB instance with the full database on the rail system **FACT_rail**. It is reachable on port 3311 of the localhost and the root password is 'devops'. -- GitLab