Carte interactive pour découvrir le patrimoine breton recensé Interactive map to discover listed breton heritage
- MRI 2.3.0
- Postgres 9.5 configuration file
# Install and configure db
$ bundle install
$ bundle exec rake db:create
$ bundle exec rake db:migrate
# Launch app
$ bundle exec rails s
- Start Postgres server
$ docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:latest
- Create/migrate database
$ docker run --rm \
-e BREIZHTRIP_DATABASE_HOST=192.168.20.42 \
-e BREIZHTRIP_DATABASE_PORT=5432 \
-e BREIZHTRIP_DATABASE_USERNAME=postgres \
-e BREIZHTRIP_DATABASE_PASSWORD=postgres \
-it mdouchement/breizhtrip:latest bundle exec rake db:create
$ docker run --rm \
-e BREIZHTRIP_DATABASE_HOST=192.168.20.42 \
-e BREIZHTRIP_DATABASE_PORT=5432 \
-e BREIZHTRIP_DATABASE_USERNAME=postgres \
-e BREIZHTRIP_DATABASE_PASSWORD=postgres \
-it mdouchement/breizhtrip:latest bundle exec rake db:migrate
- Start BreizhTrip
$ docker run --name breizhtrip \
-e BREIZHTRIP_DATABASE_HOST=192.168.20.42 \
-e BREIZHTRIP_DATABASE_PORT=5432 \
-e BREIZHTRIP_DATABASE_USERNAME=postgres \
-e BREIZHTRIP_DATABASE_PASSWORD=postgres \
-e RAILS_SERVE_STATIC_FILES=true \
-p 3000:3000 -d mdouchement/breizhtrip:latest
# or with linked Postgres server container
$ docker run --name breizhtrip \
--link postgres:psqlhost \
-e BREIZHTRIP_DATABASE_HOST=psqlhost \
-e BREIZHTRIP_DATABASE_PORT=5432 \
-e BREIZHTRIP_DATABASE_USERNAME=postgres \
-e BREIZHTRIP_DATABASE_PASSWORD=postgres \
-e RAILS_SERVE_STATIC_FILES=true \
-p 3000:3000 -d mdouchement/breizhtrip:latest
To set any environment variable in the container, use one or more -e
flags:
BREIZHTRIP_NAMESPACE
→ namespace the urlRAILS_SERVE_STATIC_FILES
→ the webapp serves all the assets instead of NGINXBREIZHTRIP_DATABASE_POOL
→ database connection pool sizeBREIZHTRIP_DATABASE_HOST
→ database host (IP address or URL)BREIZHTRIP_DATABASE_PORT
→ database port (by default 5432)BREIZHTRIP_DATABASE_USERNAME
→ database credentialBREIZHTRIP_DATABASE_PASSWORD
→ database credential
$ bundle exec rake 'legacy:load[inventaire_patrimoine.json]'
https://www.data.gouv.fr/fr/datasets/inventaire-du-patrimoine-breton/
$ bundle exec rake 'legacy:load_tsv[final.tsv]'
https://mega.nz/#!N1tTSQ6b!feq9miUz7Ff80ctzwP4HfUQht39MIbCmkSI0woKxhw8
MIT. See the LICENSE for more details.
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Ensure specs and Rubocop pass
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request