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

self hosted installation script #259

Open
aspx1981 opened this issue Jan 28, 2024 · 1 comment
Open

self hosted installation script #259

aspx1981 opened this issue Jan 28, 2024 · 1 comment

Comments

@aspx1981
Copy link

hello,
I tried the online version and I'd like to install on my ubuntu but without docker,
I'm trying to create the DB schema and install the code to use with ngnix, but no luck,
do you have some hints ? because I don't know ruby.

thanks a lot

@phylor
Copy link
Contributor

phylor commented Jan 28, 2024

This is a bit more elaborate. What you need:

  • Ruby 3.2.2. Not sure what Ubuntu has at the moment, you might need to use rbenv to install the correct Ruby version. Although it's not a hard dependency, so you might get lucky and be able to run it with an older version.
  • A database or use sqlite: DATABASE_URL=sqlite3:db/data/coupons.sqlite3
  • Ensure you have the following environment variables set:
RAILS_ENV=production
RAILS_LOG_TO_STDOUT=true
RAILS_SERVE_STATIC_FILES=true
SECRET_KEY_BASE=set-to-some-random-string
CODE_VERSION=latest
  • In the application directory, run the following to install dependencies:
bundle config set --local without 'development test'
bundle install
  • To setup assets:
bin/rails assets:precompile
  • Setup database. Either set DATABASE_URL accordingly, or change settings in config/database.yml.
bin/rails db:create db:migrate
  • Start the server. You could then proxy with nginx to port 1818.
bin/rails server -b 127.0.0.1 --port=1818

If that doesn't work, let me know what errors you get!

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

No branches or pull requests

2 participants