-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from pulibrary/readme-structure
Reorganize readme a bit for creater clarity
- Loading branch information
Showing
1 changed file
with
30 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,58 @@ | ||
# DpulCollections | ||
|
||
To run the development database type: `lando start` | ||
## Project Setup for Development and Test environments | ||
|
||
To start your Phoenix server: | ||
### Every time setup | ||
|
||
* Run `mix setup` to install and setup dependencies | ||
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` | ||
Do these things every time you start new work in this project in dev or test | ||
|
||
- `$ lando start` will run the test and dev database and index services | ||
- `mix setup` will install and setup dependencies | ||
|
||
### Development environment | ||
|
||
- `mix phx.server` will start the phoenix endpoint | ||
- or `iex -S mix phx.server` will start the phoenix endpoint inside IEx | ||
|
||
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. | ||
|
||
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). | ||
### Running Tests | ||
|
||
## Running Tests | ||
- `mix test` will run all the test suite | ||
- after tests are run, `./cover` will contain coverage data | ||
|
||
`mix test` | ||
## Occasional tasks for Development and Test environments | ||
|
||
This will run all your tests and store your coverage data in `./cover`. | ||
### Figgy Fixtures | ||
|
||
## Checking Formatting | ||
We copy fixtures from Figgy's production database into a Docker container so that we can easily use it for testing indexing. To rebuild that container: | ||
|
||
`mix format` will format your code | ||
`mix format --check-formatting` will tell you formatting that must be done. | ||
- `brew install lastpass-cli` | ||
- `cd figgy-fixture-container && ./build-and-push.sh` | ||
|
||
## Build & Run Production Docker Image Locally | ||
## Code contributions | ||
|
||
Build Docker Image: `docker build . -t dpul-collections` | ||
Remember to check formatting before pushing commits. | ||
|
||
The SECRET_KEY_BASE below is just a filler one for the purpose of testing locally. | ||
- `mix format` will format your code | ||
- `mix format --check-formatting` will tell you formatting that must be done. | ||
|
||
Run Docker Image: `docker run -t -p 4000:4000 -e DATABASE_URL='ecto://postgres:@host.docker.internal:5434/database' -e SECRET_KEY_BASE='B8rwzeX3DFLveiJ4cP28lRGc0PWdEr8ZF/hDoPRucw95Nzf2IPnu7lhEB+Yldx6Z' dpul-collections` | ||
## Production tasks | ||
|
||
## Deployment | ||
### Deployment | ||
|
||
1. Connect to VPN | ||
1. `BRANCH=<branch> ./bin/deploy staging` | ||
|
||
## Connecting to Staging Shell or IEX Console | ||
### Connecting to Staging Shell or IEX Console | ||
|
||
1. Connect to VPN | ||
1. `./bin/console staging [bash/repl]` | ||
|
||
## Figgy Fixtures | ||
|
||
We copy fixtures from Figgy's production database into a Docker container so that we can easily use it for testing indexing. To rebuild that container: | ||
### Build & Run Production Docker Image Locally | ||
|
||
`brew install lastpass-cli` | ||
`cd figgy-fixture-container && ./build-and-push.sh` | ||
Build Docker Image: `docker build . -t dpul-collections` | ||
|
||
## Learn more | ||
The SECRET_KEY_BASE below is just a filler one for the purpose of testing locally. | ||
|
||
* Official website: https://www.phoenixframework.org/ | ||
* Guides: https://hexdocs.pm/phoenix/overview.html | ||
* Docs: https://hexdocs.pm/phoenix | ||
* Forum: https://elixirforum.com/c/phoenix-forum | ||
* Source: https://github.com/phoenixframework/phoenix | ||
Run Docker Image: `docker run -t -p 4000:4000 -e DATABASE_URL='ecto://postgres:@host.docker.internal:5434/database' -e SECRET_KEY_BASE='B8rwzeX3DFLveiJ4cP28lRGc0PWdEr8ZF/hDoPRucw95Nzf2IPnu7lhEB+Yldx6Z' dpul-collections` |