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

Update config for first local start #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

DSIW
Copy link

@DSIW DSIW commented Mar 5, 2025

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

erb is a dependency of rails and shouldn't be needed here
foreman will automatically be installed by bin/dev if not installed, but it's not a project dependency, you can just run rails s and the tailwind watcher separately. So IMO those don't belong into the Gemfile.

Copy link
Contributor

Choose a reason for hiding this comment

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

If rails is installed as a gem as per the official installation instructions, rails ... should find and call the bin/rails file (or do the same thing). Not sure why this change is needed? Otherwise if you don't have rails as a global gem, use bundle exec rails for the same effect.

Comment on lines +2 to +18
sunshine:
build: .
ports:
- "3000:3000"
volumes:
- .:/app
- bundle_cache:/usr/local/bundle
environment:
- RAILS_ENV=development
- RAILS_MAX_THREADS=5
- MQTT_HOST=localhost
- MQTT_PORT=1883
- MQTT_USERNAME=cloud_service
- MQTT_PASSWORD=password
depends_on:
- mqtt
network_mode: host
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work properly with hot reload etc.? I think it might be better to get rid of compose.yml and go the devcontainer route?

Copy link
Contributor

Choose a reason for hiding this comment

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

The Dynamic Security plugin is absolutely needed for proper production deployment, so I would suggest creating a mosquitto.dev.conf or something and running that in dev.

Copy link
Contributor

Choose a reason for hiding this comment

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

Alternatively, just running mosquitto in docker with the plugin should just work?

Comment on lines +6 to +8
# per_listener_settings false
# plugin /usr/lib/mosquitto_dynamic_security.so
# plugin_opt_config_file /mosquitto/data/dynamic-security.json
Copy link
Contributor

Choose a reason for hiding this comment

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

The plugin should be there on mosquitto docker. See deploy.yml for the volume/directory structure required to mount it properly.

Copy link
Contributor

Choose a reason for hiding this comment

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

This file should actually contain only a password for the cloud_service user and the dynsec admin user (if dynsec is used). I will update the README with instructions on setting up the MQTT service user and dynsec.

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