Skip to content

fixes, local development and qr in device setup - #1

Open
pxp9 wants to merge 1 commit into
protolux-electronics:mainfrom
pxp9:fixes-and-qr-code
Open

fixes, local development and qr in device setup#1
pxp9 wants to merge 1 commit into
protolux-electronics:mainfrom
pxp9:fixes-and-qr-code

Conversation

@pxp9

@pxp9 pxp9 commented Apr 13, 2026

Copy link
Copy Markdown
  1. Fixes the testing
  2. Fixes the local development flow by creating a mock minio sever. (setup via docker compose)
  3. Adds the QR link to be configured in the name badge see this PR add custom qr code for networking name_badge#28

for testing locally

docker compose -f docker-compose.dev.yml up -d
MINIO_HOST=[LOCAL IP SERVER] iex -S mix phx.server
## Example
MINIO_HOST=192.168.0.14 iex -S mix phx.server

Signed-off-by: Pepe Márquez Romero <pepe.marquezromero@protonmail.com>
Comment thread config/dev.exs
# Binding to loopback ipv4 address prevents access from other machines.
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
http: [ip: {127, 0, 0, 1}, port: String.to_integer(System.get_env("PORT") || "4000")],
http: [ip: {0, 0, 0, 0}, port: String.to_integer(System.get_env("PORT") || "4000")],

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

allows local development in your local network

Comment thread config/dev.exs
config :swoosh, :api_client, false

# MinIO (local S3) config for development
# Uses mDNS hostname - works for both local (via hosts) and network devices

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

setups minio in local development

Comment thread config/runtime.exs
System.get_env("AWS_SECRET_ACCESS_KEY") ||
raise("Missing env variable: AWS_SECRET_ACCESS_KEY")
if config_env() == :prod do
# Tigris config

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

tigris conf under prod

photos -> photos
end
def handle_info(:update, %{photos: []} = state) do
case Media.list_approved_images() |> Enum.shuffle() do

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

fix when not approved photos

Comment thread docker-compose.dev.yml

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

setups the minio for local development.

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.

1 participant