Skip to content

Commit

Permalink
feat: create instructions for running project from scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Kinsey authored and Anthony Kinsey committed Jan 29, 2022
1 parent 58a0260 commit 5e9e7f9
Showing 1 changed file with 64 additions and 1 deletion.
65 changes: 64 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,69 @@
# epochtalk-vue

## Project setup
## Project setup from scratch

### Install system dependencies

* homebrew
* install postgresql
* install redis
* install asdf
* setup postgresql
* `
CREATE USER postgres SUPERUSER;
CREATE DATABASE postgres WITH OWNER postgres;
`
* setup asdf
* edit `~./zshrc` and add line to EOF `. $HOME/.asdf/asdf.sh`
* setup node, elixir
* `asdf plugin add nodejs`
* `asdf plugin add erlang`
* `asdf plugin add elixir`
* install project specific versions of node and elixir
* change directories into `epochtalk-vue` project
* run `asdf install`

### Setup epoch database

* checkout epoch `git clone [email protected]:epochtalk/epoch.git`
* change directories to epoch project `cd epoch`
* make sure correct version of elixir is installed `asdf install`
* install deps `mix deps.get`
* run epochtalk database migration `mix ecto.setup`

### Setup old epochtalk project to run as server

* checkout epochtalk `git clone [email protected]:epochtalk/epochtalk.git`
* change directories to epochtalk project `cd epochtalk`
* install deps `yarn install`
* install project specific versions of system deps `asdf install`
* create admin user
* `create-user <username> <email> --password <password> --admin`
* if this fails, attempt to start epochtalk server with and try again
* copy `example.env` to `.env`
* edit `.env`
* comment out `line 40` `# WEBSOCKET_SERVER_KEY_NAME=server.key`
* comment out `line 41` `# WEBSOCKET_SERVER_CERT_NAME=server.crt`
* comment out first section of emailer options `lines 52-62`
* fill out section section your email information (need to check email provider for info on how to setup smtp)
* change `line 34` `WEBSOCKET_SECURE=true` to `WEBSOCKET_SECURE=false`
* enable cors so vue project can access server, edit `/server/server-options.js`
* inside of the `route` object, add the following code
```
cors: {
origin: ['*'],
additionalHeaders: ['cache-control', 'x-requested-with']
},
```
* start the server `yarn serve`

### Start vue project
* change directories into `epochtalk-vue`
* run the server `yarn serve`
* to access new site visit `localhost:8000`
* to access old site/admin panel visit `localhost:8080`

## Standard setup
```
yarn install
```
Expand Down

0 comments on commit 5e9e7f9

Please sign in to comment.