|
1 | 1 | # epochtalk-vue
|
2 | 2 |
|
3 |
| -## Project setup |
| 3 | +## Project setup from scratch |
| 4 | + |
| 5 | +### Install system dependencies |
| 6 | + |
| 7 | +* homebrew |
| 8 | + * install postgresql |
| 9 | + * install redis |
| 10 | + * install asdf |
| 11 | +* setup postgresql |
| 12 | + * ` |
| 13 | + CREATE USER postgres SUPERUSER; |
| 14 | + CREATE DATABASE postgres WITH OWNER postgres; |
| 15 | + ` |
| 16 | +* setup asdf |
| 17 | + * edit `~./zshrc` and add line to EOF `. $HOME/.asdf/asdf.sh` |
| 18 | +* setup node, elixir |
| 19 | + * `asdf plugin add nodejs` |
| 20 | + * `asdf plugin add erlang` |
| 21 | + * `asdf plugin add elixir` |
| 22 | +* install project specific versions of node and elixir |
| 23 | + * change directories into `epochtalk-vue` project |
| 24 | + * run `asdf install` |
| 25 | + |
| 26 | +### Setup epoch database |
| 27 | + |
| 28 | +* checkout epoch `git clone git@github.com:epochtalk/epoch.git` |
| 29 | +* change directories to epoch project `cd epoch` |
| 30 | +* make sure correct version of elixir is installed `asdf install` |
| 31 | +* install deps `mix deps.get` |
| 32 | +* run epochtalk database migration `mix ecto.setup` |
| 33 | + |
| 34 | +### Setup old epochtalk project to run as server |
| 35 | + |
| 36 | +* checkout epochtalk `git clone git@github.com:epochtalk/epochtalk.git` |
| 37 | +* change directories to epochtalk project `cd epochtalk` |
| 38 | +* install deps `yarn install` |
| 39 | +* install project specific versions of system deps `asdf install` |
| 40 | +* create admin user |
| 41 | + * `create-user <username> <email> --password <password> --admin` |
| 42 | + * if this fails, attempt to start epochtalk server with and try again |
| 43 | +* copy `example.env` to `.env` |
| 44 | +* edit `.env` |
| 45 | + * comment out `line 40` `# WEBSOCKET_SERVER_KEY_NAME=server.key` |
| 46 | + * comment out `line 41` `# WEBSOCKET_SERVER_CERT_NAME=server.crt` |
| 47 | + * comment out first section of emailer options `lines 52-62` |
| 48 | + * fill out section section your email information (need to check email provider for info on how to setup smtp) |
| 49 | + * change `line 34` `WEBSOCKET_SECURE=true` to `WEBSOCKET_SECURE=false` |
| 50 | +* enable cors so vue project can access server, edit `/server/server-options.js` |
| 51 | + * inside of the `route` object, add the following code |
| 52 | + ``` |
| 53 | + cors: { |
| 54 | + origin: ['*'], |
| 55 | + additionalHeaders: ['cache-control', 'x-requested-with'] |
| 56 | + }, |
| 57 | + ``` |
| 58 | +* start the server `yarn serve` |
| 59 | + |
| 60 | +### Start vue project |
| 61 | +* change directories into `epochtalk-vue` |
| 62 | +* run the server `yarn serve` |
| 63 | +* to access new site visit `localhost:8000` |
| 64 | +* to access old site/admin panel visit `localhost:8080` |
| 65 | + |
| 66 | +## Standard setup |
4 | 67 | ```
|
5 | 68 | yarn install
|
6 | 69 | ```
|
|
0 commit comments