mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Update README.md
This commit is contained in:
30
README.md
30
README.md
@@ -4,20 +4,30 @@
|
||||
|
||||
```sh
|
||||
# Set it up...
|
||||
git clone https://github.com/hackclub/harbor && cd harbor
|
||||
$ git clone https://github.com/hackclub/harbor && cd harbor
|
||||
|
||||
# Set your config
|
||||
cp .env.example .env
|
||||
$ cp .env.example .env
|
||||
# The only thing you need to set is SEED_USER_API_KEY, which should be your key
|
||||
|
||||
# THIS IS THE PART WHERE YOU EDIT YOUR CONFIG
|
||||
vim .env
|
||||
# Build & run the project
|
||||
$ docker compose run web --service-ports /bin/bash
|
||||
|
||||
# need your local db to be encrypted for some reason? Sure! Replace all the
|
||||
# secrets with the output of this:
|
||||
bin/rails runner "puts SecureRandom.base64"
|
||||
# not guaranteed to be secure for production, but fine for local development
|
||||
# Now you're inside docker & you can do all the fun rails things...
|
||||
app# bin/rails s -b 0.0.0.0 # this hosts the server on your computer w/ default port 3000
|
||||
app# bin/rails c # start an interactive irb!
|
||||
app# bin/rails db:migrate # migrate the database
|
||||
```
|
||||
|
||||
Ever need to setup a new database?
|
||||
|
||||
```sh
|
||||
# start a shell inside docker
|
||||
$ docker compose run web --service-ports /bin/bash
|
||||
|
||||
# once inside, reset the db
|
||||
app# $ bin/rails db:drop db:create db:migrate db:seed
|
||||
```
|
||||
|
||||
|
||||
# Build the project
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user