https://github.com/shuntagami/rails_postgres
Dockerized Rails app skelton
https://github.com/shuntagami/rails_postgres
docker postgresql rails template
Last synced: 3 months ago
JSON representation
Dockerized Rails app skelton
- Host: GitHub
- URL: https://github.com/shuntagami/rails_postgres
- Owner: shuntagami
- Created: 2021-12-26T12:00:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-25T23:05:34.000Z (over 3 years ago)
- Last Synced: 2025-12-29T15:51:04.016Z (6 months ago)
- Topics: docker, postgresql, rails, template
- Language: Ruby
- Homepage:
- Size: 211 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shuntagami/rails_postgres
This is a dockerized Rails6 application template.
## keywords
- Database: **PostgreSQL**
- Test: **Rspec**
- CI: **Github Actions**
- Webpacker (Asset Pipeline/Sprockets is disabled)
- OpenAPI
- API schema test: **committee-rails**
## How to use
### Development build by docker-compose
```bash
$ make all
```
### FYI: Development build without docker-compose
```bash
$ docker network create rails-network # Create a network of rails-network
$ docker build -t postgres docker/postgres/. # Buiid a postgres image.
$ docker run --name postgres --net rails-network -d --env-file ./docker/postgres/.env -v db-data:/var/lib/postgresql/data postgres # Run a postgres image with a specific network and env-file.
$ docker build --target development -t my-api . # Build a rails-app image of my-api.
$ docker run --rm --name rails_postgres --env-file .env --net rails-network -d -p 3000:3000 -v $(pwd):/opt/app my-api # Run a rails-app image with a specific network and env-file.
```
### Health check
```bash
$ curl localhost:3000/api/_healthcheck
{"message":"OK"}
```
### Production build
```bash
$ make image.build # build docker image for production.
$ make image.push # push to docker registry.
```
You can pull my image from docker hub.
- https://hub.docker.com/repository/docker/shuntagami/rails_postgres