Skip to content

Commit cc93511

Browse files
committed
add documentation for local development setup
1 parent 9bf8a8d commit cc93511

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Browse the readme below, or jump to [a full example](#full-example).
3434
- [URL Generation](#url-generation)
3535
- [Alternate S3 configuration example](#alternate-s3-configuration-example)
3636
- [Full example](#full-example)
37+
- [Development](/documentation/development.md)
3738

3839
## Installation
3940

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: "2.4"
2+
services:
3+
waffle:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile.codeship
7+
command: tail -f /dev/null
8+
volumes:
9+
- .:/srv/app:cached

documentation/development.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Development
2+
3+
Development documentation with instructions how to setup the project for local development.
4+
5+
## Preliminary
6+
7+
* Docker
8+
9+
```sh
10+
# screen 1
11+
$ docker-compose up
12+
13+
# screen 2
14+
$ docker-compose exec waffle sh
15+
$ > mix deps.get
16+
```
17+
18+
## Run tests
19+
20+
### Tests without S3 integration
21+
```sh
22+
$ mix test
23+
```
24+
25+
### Tests with S3 integration
26+
27+
AWS S3 setup
28+
- create a new user with FullS3Access
29+
- copy `key_id` and `secret`
30+
- create a new backet with *public access*
31+
- comment the `s3` exlusion inside `test/test_helper.exs`
32+
33+
```sh
34+
$ export WAFFLE_TEST_BUCKET=
35+
$ export WAFFLE_TEST_S3_KEY=
36+
$ export WAFFLE_TEST_S3_SECRET=
37+
$ mix test
38+
```

0 commit comments

Comments
 (0)