Hopefully the final fixes based on fresh installs with both Docker install methods

This commit is contained in:
Jyri-Petteri Paloposki 2020-07-20 00:58:45 +03:00
parent bec0884bac
commit 4dd52e591d
5 changed files with 13 additions and 6 deletions

3
.gitignore vendored
View file

@ -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

View file

@ -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

View file

@ -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 "$@"

View file

@ -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

View file

@ -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!"