Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a docker-compose file to simplify dev environment setup #139

Open
piraka9011 opened this issue Oct 22, 2024 · 2 comments
Open

Create a docker-compose file to simplify dev environment setup #139

piraka9011 opened this issue Oct 22, 2024 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@piraka9011
Copy link
Member

piraka9011 commented Oct 22, 2024

Right now developers have to install and setup postgres locally on their machines as well as modify the database.yml file in order to get setup correctly. The local postgres installation may also conflict with other apps using the local postgres db.

Create a new docker-compose.yml file that sets up the DB properly and also update the database.yml file to reflect any changes made to the docker-compose.yml.
Update the README with instructions on how to setup docker and run the compose file before running the rails app.

Sample Compose file:

services:
  db:
    image: postgres:14
    # To improve the performance of postgres, you can add the following flags
    # -c maintenance_work_mem=1GB -c effective_cache_size=12GB -c work_mem=1GB -c shared_buffers=4GB -c wal_buffers=16MB
    command: >
      postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=off
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
    env_file:
      - .env
    ports:
      - "5432:5432"
    volumes:
      - postgres-data:/var/lib/postgresql/data

volumes:
  postgres-data:
@piraka9011 piraka9011 added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 22, 2024
@JP-sDEV
Copy link

JP-sDEV commented Oct 22, 2024

Hi can I be assigned this issue?

@piraka9011
Copy link
Member Author

@JP-sDEV Sure just open up a PR and tag this issue and we'll review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants