8000 GitHub - kostspielig/maria: πŸ³πŸ“Έ πŸŽ₯ πŸ“πŸ·
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kostspielig/maria

Repository files navigation

Maria

App built using Phoenix and Elixir.

Run locally πŸ“Œ

To start Maria's App server 1:

  • s nix-shell
  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit maria's page at localhost:4000.

We are using amazon S3 to store images. If you want recipe creation/update to work locally you need to configure a .env file with the AWS credentials see. Basic configuration should look like:

export AWS_ACCESS_KEY_ID="<replace_key_id"
export AWS_SECRET_ACCESS_KEY="<replace_secret_access_key>"
export AWS_REGION="<replace_aws_region>"

1 If you are running the app for the first time you will need to configure the DB and Nix:

  • Install nix. If using Arch Linux: yay -S nix
  • Get into your nix environment nix-shell, where the correct versions of the packages to run this project are.
  • Install postgresql and start the service.
  • Configure the DB: mix ecto.create.
  • nix-shell ↩

See local DB config here

Run in production ☁️

We are hosting the app at Gigalixir- a PaaS built for Elixir. We use here the free tier that provides instance with 0.2GB of memory and 1 postgresql database limited to 10,000 rows. See console here.

Steps to deploy (followed this steps earlier):

git push gigalixir

If there are changes in the DB run: gigalixir run mix ecto.migrate

To see production logs πŸ’¬ run gigalixir logs

To connect to prod DB run gigalixir pg:psql

Also πŸ‘€ phoenix deployment guides.

Test πŸ§ͺ

Run tests in the project with:

MIX_ENV=test mix test

To only run specific tests add this tag @tag runnable: true before each test and run:

mix test --only runnable:true

To get into a console with test environment:

MIX_ENV=test iex -S mix

Note: If you wanna use the Logger while executing test, you should use warn level or above (Logger.warn, Logger.error). See test config here

Mail

We are using Swoosh [not yet configured live]

To see mailbox in dev go to: http://localhost:4000/dev/mailbox/ or curl: curl http://localhost:4000/dev/mailbox/json

Error Pages

In maria/config/dev.exs set debug_errors: false if you want to be able to debug error pages.

About

πŸ³πŸ“Έ πŸŽ₯ πŸ“πŸ·

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0