Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit f4f0163

Browse files
committed
Finish documentation for local staging environment
1 parent 0f41e14 commit f4f0163

File tree

4 files changed

+46
-24
lines changed

4 files changed

+46
-24
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ And debug your app with [Chrome Dev Tools](chrome://inspect).
3939
Change configuration in `config/docker/local-development.json` or
4040
`config/docker/local.json` and rerun `docker-compose up --build`.
4141

42+
#### Local Staging Environment
43+
44+
To get an environment which is close to production, run the following:
45+
```sh
46+
$ docker-compose -f docker-compose.yml -f docker-compose.staging.yml up --build
47+
```
48+
4249
### Testing in Docker
4350

4451
Run the entire test suite with:
@@ -127,15 +134,6 @@ Getting up and running is as easy as 1, 2, 3, 4 ... 5.
127134
Now, your API should be running at [http://localhost:3030](http://localhost:3030).
128135
If you seeded your database, you will see some contributions at [http://localhost:3030/contributions](http://localhost:3030/contributions).
129136

130-
7. Setup and Start Thumbnail Service (optional)
131-
132-
Install [Thumbor](https://github.com/thumbor/thumbor) locally on your machine according to the [documentation](http://thumbor.readthedocs.io/en/latest/installing.html) and start it with:
133-
```sh
134-
$ thumbor
135-
```
136-
Set the `thumbor.url` in `config/local.json` to `http://localhost:8888`.
137-
The `thumbor.key` does not necessarily have to be defined, it just makes the URL more secure.
138-
> Do not forget to always start it if you choose that setup or otherwise you will not see any pictures at all.
139137

140138
### Local Configuration
141139

config/local-staging-docker.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"baseURL": "http://172.25.0.11:3030",
3+
"seeder": {
4+
"runOnInit": true,
5+
"dropDatabase": true
6+
},
7+
"smtpConfig": {
8+
"host": "maildev",
9+
"port": 25,
10+
"ignoreTLS": true
11+
},
12+
"thumbor": {
13+
"url": "http://localhost:8000",
14+
"key": ""
15+
}
16+
}

docker-compose.staging.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,36 @@ version: '3'
22

33
services:
44
api:
5+
image: humanconnection/api-feathers
6+
build:
7+
context: .
8+
environment:
9+
- NODE_ENV=staging
10+
depends_on:
11+
- maildev
12+
- thumbor
13+
ports:
14+
- "3030:3030"
515
networks:
616
hc-network:
717
ipv4_address: 172.25.0.11
818
thumbor:
919
networks:
1020
hc-network:
1121
ipv4_address: 172.25.0.13
22+
maildev:
23+
image: djfarrelly/maildev
24+
networks:
25+
- hc-network
26+
ports:
27+
- "1080:80"
28+
- "1025:25"
29+
thumbor:
30+
image: apsl/thumbor
31+
networks:
32+
- hc-network
33+
ports:
34+
- "8000:8000"
1235

1336
networks:
1437
hc-network:

docker-compose.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ services:
55
build: .
66
depends_on:
77
- mongo
8-
- maildev
9-
- thumbor
108
networks:
119
- hc-network
1210
volumes:
@@ -16,19 +14,6 @@ services:
1614
networks:
1715
- hc-network
1816
command: "--smallfiles --logpath=/dev/null"
19-
maildev:
20-
image: djfarrelly/maildev
21-
networks:
22-
- hc-network
23-
ports:
24-
- "1080:80"
25-
- "1025:25"
26-
thumbor:
27-
image: apsl/thumbor
28-
networks:
29-
- hc-network
30-
ports:
31-
- "8000:8000"
3217

3318
networks:
3419
hc-network:

0 commit comments

Comments
 (0)