Skip to content

Conversation

@iguanus
Copy link

@iguanus iguanus commented Jun 8, 2024

Changes

  • README entry for docker
  • Enable Docker setup (Dockerfile, compose and .env)
  • Enable remote connections (ie: localhost -> 0.0.0.0, as browser is usually not within the container)

This change is Reviewable

# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: localhost
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.0.0.0 is required, as the container is not in the same space as the host.

For truly remote, such as CodeSpaces, one might also need to change the allowed list below

# Procfile for development using HMR
# You can run these commands in separate shells
rails: bundle exec rails s -p 3000
rails: bundle exec rails s -b 0.0.0.0 -p 3000
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable accepting requests from outside the container, like from the browser.

Dockerfile Outdated
Comment on lines 36 to 37
# Run the app when the container launches
CMD ["foreman", "start", "-f", "Procfile.dev"] No newline at end of file
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be configured differently, but it is likely a good idea to try to run both bare metal and containers through the same commands to avoid the need to update in multiple places when change comes.

@iguanus iguanus requested a review from Judahmeek June 8, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants