Calendaring app for shift-workers to enter their uneven work schedule more easily
Find a file
2023-01-27 17:24:57 -05:00
assets npm update, remove runtime.exs as not using for now 2022-08-14 13:58:41 -04:00
config initial work on a releases runtime config 2023-01-27 17:15:24 -05:00
lib update assets to try to fix favicon issue 2023-01-27 17:24:57 -05:00
priv update assets to try to fix favicon issue 2023-01-27 17:24:57 -05:00
test updated Bamboo references to Swoosh; added runtime.exs config file 2022-08-13 06:39:14 -04:00
.formatter.exs Create phoenix project 2020-09-12 19:47:24 -03:00
.gitignore don't gzip static files, and always commit them 2022-08-14 15:09:30 -04:00
.iex.exs month & shift navigation progress 2021-03-15 15:46:59 -04:00
Dockerfile added Dockerfile and entrypoint script 2022-08-14 15:14:14 -04:00
entrypoint.sh added Dockerfile and entrypoint script 2022-08-14 15:14:14 -04:00
mix.exs update assets to try to fix favicon issue 2023-01-27 17:24:57 -05:00
mix.lock updated deps & switched from Mix.Config to Config 2022-08-13 06:19:56 -04:00
README.md update assets to try to fix favicon issue 2023-01-27 17:24:57 -05:00

Shift73k

Calendaring app for shift-worker shift tracking, with support for CSV export and sharing work schedule with others.

Written in Elixir & Phoenix LiveView, with Bootstrap v5.

Production

To run in production, you'll need to provide several environment variable values:

MIX_ENV=prod \
PHX_SERVER=true \
DB_SOCK=[postgres unix socket path] \
DB_NAME=[postgres db name] \
DB_USER=[postgres db user] \
DB_PASS=[postgres db user password] \
SECRET_KEY_BASE=[phoenix secret key base] \
PHX_HOST=[server fqdn (e.g., shift.73k.us)] \
SMTP_RELAY=[smtp server] \
SMTP_PORT=[smtp port] \
SMTP_USER=[smtp username] \
SMTP_PASS=[smtp user password] \
MAIL_REPLY_TO=reply@73k.us \
MAIL_FROM_FRIENDLY=Shift73k \
MAIL_FROM_ADDR=shift73k@73k.us \
ALLOW_REG=[open for registration? true/false] \
iex -S mix phx.server

TODO

  • Proper modal to delete shifts? [2022-08-14]
  • move runtime config out of compile-time config files, to move towards supporting releases
    • probably need to use def get_app_config style functions instead of @module_var module variables, (see this)
  • Update tests, which are probably all way out of date. But I also don't care that much for this project...

Deploying

I'm using a dumb & simple docker approach to deploying this now. Nothing automated, the basic steps are:

  1. ensure latest assets are built, digested, and committed to the repo

    # rebuild static assets:
    MIX_ENV=prod mix phx.digest.clean --all
    rm -rf ./priv/static/*
    npm --prefix assets run build
    MIX_ENV=prod mix phx.digest
    # then do a new commit and push...
    
  2. on server, build a new container, and run it