Updated Docker image (markdown)

Jyri-Petteri Paloposki 2020-07-19 15:29:53 +03:00
parent e095025972
commit c14cbc654b

@ -12,11 +12,27 @@ $ 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
$ docker run -p 3000:3000 --name tracks --link mariadb:db -t tracks
If all went to plan, you should now be able to reach Tracks in http://localhost:3000 .
*Note:* You can override files in the Docker image by using the --volume argument.
### Environmental variables
You can override database connection details by defining the environment variables in the run command, for example ”-e DATABASE_USERNAME=tracks_dev”.
|Name |Default |For PostgreSQL |
|------------------|---------|---------------|
|DATABASE_NAME |tracks | |
|DATABASE_HOST |db | |
|DATABASE_PORT |3306 |5432 |
|DATABASE_USERNAME |tracks | |
|DATABASE_PASSWORD |password | |
|DATABASE_TYPE |mysql2 |postgresql |
|DATABASE_ENCODING |utf8 |unicode |
### Override files
You can override files in the Docker image by using the --volume argument.
|File |Argument |Replace for production?|
|-------------------|---------------------------------------------------------|-----------------------|