mirror of
https://github.com/System-End/highway.git
synced 2026-04-19 22:05:13 +00:00
Add more documentation on how to start server
This was so hard :pf:
This commit is contained in:
parent
d5c6446db0
commit
c9aba77972
3 changed files with 27 additions and 4 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -37,4 +37,4 @@
|
|||
!/app/assets/builds/.keep
|
||||
|
||||
.DS_Store
|
||||
# Ignore Mac system files
|
||||
# Ignore Mac system files
|
||||
|
|
|
|||
27
README.md
27
README.md
|
|
@ -4,7 +4,7 @@ Welcome to the Hack Club Highways.
|
|||
|
||||
## Local development
|
||||
|
||||
To run this project, you need to first install `ruby`, `ruby-stdlib`, `postgresql-libs` and `gem`.
|
||||
To run this project, you need to first install `ruby`, `ruby-stdlib`, `postgresql`, `postgresql-libs`, `docker` and `gem`.
|
||||
|
||||
Then, add the following to your `.zshrc` or `.bashrc` to activate the ruby development environment:
|
||||
```zsh
|
||||
|
|
@ -17,7 +17,30 @@ Restart your terminal session, and run the following code at the root of the clo
|
|||
gem install rails
|
||||
gem install kamal
|
||||
bundle install --gemfile /home/cyao/Developer/highway/Gemfile
|
||||
|
||||
# Get a sample postgres database.yml
|
||||
wget https://gist.githubusercontent.com/jwo/4512764/raw/f04e2b7cc94c2d8a63c21dd53741d3d56bc5b021/postgres.database.yml -o config/database.yml
|
||||
```
|
||||
|
||||
At last, run the executable at `./bin/dev` to start up the development server.
|
||||
Now, create a postgresql database:
|
||||
```
|
||||
sudo su -l postgres -c "initdb --locale=C.UTF-8 --encoding=UTF8 -D '/var/lib/postgres/data'"
|
||||
sudo su -l postgres
|
||||
$ createuser --interactive
|
||||
Enter name of role to add: sample_postgres
|
||||
Shall the new role be a superuser? (y/n) y
|
||||
$ createdb sample_postgres_development
|
||||
$ createdb sample_postgres_test
|
||||
$ createdb sample_postgres_production
|
||||
$ exit
|
||||
```
|
||||
|
||||
Start the docker server:
|
||||
```zsh
|
||||
bin/rails credentials:edit
|
||||
docker build . --tag highway:latest
|
||||
docker run highway
|
||||
```
|
||||
|
||||
At last, run the executable at `./bin/setup` to start up the development server!
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
SECRET_KEY_BASE=your_actual_secret_key_here
|
||||
SECRET_KEY_BASE=your_actual_secret_key_here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue