Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gjuliao/docker-rails
Docker-rails
https://github.com/gjuliao/docker-rails
Last synced: 16 days ago
JSON representation
Docker-rails
- Host: GitHub
- URL: https://github.com/gjuliao/docker-rails
- Owner: gjuliao
- Created: 2023-12-06T18:01:59.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-04T00:41:22.000Z (11 months ago)
- Last Synced: 2024-11-17T18:29:08.212Z (3 months ago)
- Language: Ruby
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Start copying the following template: https://github.com/new?template_name=docker-rails7&template_owner=gjuliao
# Rails 7 on Docker demo application
This app demonstrates Rails 7 with PostgreSQL, import maps, turbo, stimulus and hotwire, all running in Docker.
## Features
* Rails 7
* Ruby 3
* Dockerfile and Docker Compose configuration
* PostgreSQL database
* Redis
* GitHub Actions for
* tests
* Rubocop for linting
* Security checks with [Brakeman](https://github.com/presidentbeef/brakeman) and [bundler-audit](https://github.com/rubysec/bundler-audit)
* Building and testing of a production Docker image
* Dependabot for automated updates## Requirements
Please ensure you are using Docker Compose V2. This project relies on the `docker compose` command, not the previous `docker-compose` standalone program.
https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command
Check your docker compose version with:
```
% docker compose version
Docker Compose version v2.10.2
```## Initial setup
```
- create a .env file, and add the following variables:
- POSTGRES_DB=db
- PGHOST=db
- POSTGRES_USER=postgres # change it as needed
- POSTGRES_PASSWORD=password12345 # change it as needed
docker compose build
docker compose run --rm web bin/rails db:setup
```## Running the Rails app
```
docker compose up
```## This template was made thanks to Ryan Williams
- Check original template: https://github.com/ryanwi/rails7-on-docker/generate