mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-13 16:06:16 +01:00
Updated Docker image (markdown)
parent
e095025972
commit
c14cbc654b
1 changed files with 18 additions and 2 deletions
|
|
@ -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?|
|
||||
|-------------------|---------------------------------------------------------|-----------------------|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue