Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nobitagit/docker-rails-postgres
A Docker starter for RoR + Postgres
https://github.com/nobitagit/docker-rails-postgres
Last synced: about 1 month ago
JSON representation
A Docker starter for RoR + Postgres
- Host: GitHub
- URL: https://github.com/nobitagit/docker-rails-postgres
- Owner: nobitagit
- Created: 2020-04-04T23:11:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T18:15:20.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T11:36:25.581Z (9 months ago)
- Language: Ruby
- Size: 65.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker + Rails + Postgres
This is based on [the offical Docker docs workflow](https://docs.docker.com/compose/rails/), updated to support the early 2020 Docker-lib/Postgres [breaking changes](https://github.com/docker-library/postgres/issues/681).
```sh
docker-compose up
```The app will be running at http://localhost:3000/
> If you make changes to the Gemfile or the Compose file to try out some different configurations, you need to rebuild. Some changes require only docker-compose up --build, but a full rebuild requires a re-run of docker-compose run web bundle install to sync changes in the Gemfile.lock to the host, followed by docker-compose up --build.
To run rails commands:
```sh
docker-compose run web rails generate controller home index
```To create the DB (if needed):
```sh
docker-compose run web rake db:create
```See [here](https://stackoverflow.com/a/31542717/1446845)