Created Docker image (markdown)

Jyri-Petteri Paloposki 2020-07-17 00:35:39 +03:00
parent e0650eb13e
commit 1496cad647

15
Docker-image.md Normal file

@ -0,0 +1,15 @@
Docker is the easiest way to run Tracks, as the various library requirements have already been taken care of for you.
You can run Tracks by installing Docker and launching a MySQL instance for example using
$ docker run --name mariadb -t mariadb
Create a database and a user for Tracks. Then build the Tracks image by running the following command in the Tracks repository root:
$ docker build -t="tracks" .
And then run an instance of the image using the following command (but replacing the database connection information appropriately)
$ docker run -p 3000:3000 -e DATABASE_NAME=tracks_dev -e DATABASE_HOST=db -e DATABASE_PORT=5432 -e DATABASE_USERNAME=tracks_dev -e DATABASE_PASSWORD=password -e DATABASE_TYPE=mysql2 --name tracks --link mariadb:db -t tracks
If all went to plan, you should now be able to reach Tracks in http://localhost:3000 .