The Kir-Dev organization has history with image hosting under the project name 'warp-drive'. This new project aims to fulfill the same purpose: easy Rails application for internal image hosting, mostly needed by the blog-next project.
- Köröket kĂ©rĂ©sre kĂ©szĂt a Warp ĂĽzemeltetĹ‘je.
- Minden Ăşjonnan belĂ©pĹ‘ szemĂ©lynek jelentkeznie kell egy körbe a nyitĂł oldalon. A kör adminjai elfogadják a belĂ©pni kĂvánĂł szemĂ©lyt, ezután tud albumokat rendezni Ă©s használni.
As of rails 6.1.4 you can make ActiveStorage blobs private, by making your own authenticated controllers, but no way of wiring it in the framework is provided. To tackle this there is a little extension code, that opens the original controllers and injects authorization code. If rails version is bumped this could brake. In this case remove the extension loader from config/application.rb
- Ruby on Rails (ActiveStorage as the image storage)
- Bulma
- PhotoSwipe
- PostgreSQL
- Docker
note: This repo uses Ruby 3.0.2, if you use rbenv, install it with rbenv install 3.0.2
.
sudo su postgres # log in to postgres user
createuser -P -s warp # create a database user for the project
# Now the `createuser` command will prompt for a password. Make it `CHANGE-ME`.
exit # change back to your normal user
rails db:setup # setup the database
rails s # serve application
You might be wanting to use docker for containerizing the postgres DBMS instead of installing one yourself:
docker volume create --name=warp_db # create the persistent database volume
docker-compose --file docker-compose.dev.yml up --build -d # run ONLY the database container
After creating the database container you have to set up the database from the console (see above).
- Copy
.env.example
as.env
:cp .env.example .env
- Navigate to Developer console on the AuthSCH admin page.
- Create a new OAuth client, set the callback url to
http://localhost:3000/auth/oauth/callback
- Copy the received client id and client secret into the
.env
file, and restart your server app.
- No testing yet
- When deployed, db and web container's warp-next/storage directory (with the images) should be saved sometimes