mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00
Hopefully the final fixes based on fresh installs with both Docker install methods
This commit is contained in:
parent
bec0884bac
commit
4dd52e591d
5 changed files with 13 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -21,8 +21,9 @@
|
|||
/tmp
|
||||
config/deploy.rb
|
||||
config/site.yml
|
||||
config/database.yml
|
||||
db/data.yml
|
||||
nbproject
|
||||
rerun.txt
|
||||
tags
|
||||
.skip-docker
|
||||
.use-docker
|
||||
|
|
|
@ -55,12 +55,17 @@ Tracks container. In future there should be an official image in Docker Hub. You
|
|||
postgres=# CREATE USER tracks WITH ENCRYPTED PASSWORD 'password-goes-here';
|
||||
postgres=# CREATE DATABASE tracks OWNER=tracks;
|
||||
```
|
||||
4. Start the Tracks container:
|
||||
4. Install the schema
|
||||
```
|
||||
$ docker run --link mariadb:db --rm -t tracks bin/rake db:reset
|
||||
$ docker run --link postgres:db --rm -t tracks bin/rake db:reset
|
||||
```
|
||||
5. Start the Tracks server:
|
||||
```
|
||||
$ docker run -p 3000:3000 --name tracks --link mariadb:db -t tracks
|
||||
$ docker run -p 3000:3000 --name tracks --link postgres:db -t tracks
|
||||
```
|
||||
5. You should now be able to access Tracks in http://localhost:3000
|
||||
6. You should now be able to access Tracks in http://localhost:3000
|
||||
|
||||
## Environmental variables in the Docker image
|
||||
|
||||
|
|
|
@ -17,6 +17,4 @@ export DATABASE_ENCODING=${DATABASE_ENCODING:-utf8}
|
|||
export RAILS_SERVE_STATIC_FILES=TRUE
|
||||
export RAILS_LOG_TO_STDOUT=TRUE
|
||||
|
||||
rails db:migrate
|
||||
|
||||
exec "$@"
|
||||
|
|
|
@ -9,3 +9,6 @@ docker_compose="docker-compose --file docker-compose.yml"
|
|||
|
||||
echo "==> Building Docker image…"
|
||||
$docker_compose build
|
||||
|
||||
echo "==> Building assets…"
|
||||
bin/rake assets:precompile
|
||||
|
|
|
@ -13,6 +13,6 @@ script/poll-for-db
|
|||
|
||||
echo "==> Setting up DB…"
|
||||
# reset database to a fresh state.
|
||||
bin/rake db:create db:reset
|
||||
bin/rake db:reset
|
||||
|
||||
echo "==> App is now ready to go!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue