mirror of
https://github.com/darkwire/darkwire.io.git
synced 2025-07-18 10:49:02 +00:00
Add Deploy to Heroku button (#63)
* Add package.json and app.json * Add yarn engine * Remove extra build command * Force install dev deps * Add deploy button and update readme
This commit is contained in:
parent
d546697172
commit
6fae5e8efa
47
app.json
Normal file
47
app.json
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "Darkwire",
|
||||
"description": "End-to-end encrypted web chat",
|
||||
"keywords": [
|
||||
"cryptography",
|
||||
"chat",
|
||||
"privacy"
|
||||
],
|
||||
"website": "https://darkwire.io",
|
||||
"repository": "https://github.com/darkwire/darkwire.io",
|
||||
"env": {
|
||||
"MAILGUN_API_KEY": {
|
||||
"description": "Mailgun API Key (only required for abuse reporting)",
|
||||
"required": false
|
||||
},
|
||||
"ABUSE_TO_EMAIL_ADDRESS": {
|
||||
"description": "Where to send abuse reports (only required for abuse reporting)",
|
||||
"required": false
|
||||
},
|
||||
"MAILGUN_DOMAIN": {
|
||||
"description": "Mailgun domain (only required for abuse reporting)",
|
||||
"required": false
|
||||
},
|
||||
"ABUSE_FROM_EMAIL_ADDRESS": {
|
||||
"description": "From address on abuse emails (only required for abuse reporting)",
|
||||
"required": false
|
||||
},
|
||||
"API_HOST": {
|
||||
"description": "Example: 'api.your-darkwire-api.com'",
|
||||
"required": false
|
||||
},
|
||||
"API_PROTOCOL": {
|
||||
"description": "Example: 'https'",
|
||||
"required": false,
|
||||
"value": "https"
|
||||
},
|
||||
"API_PORT": {
|
||||
"description": "Example: 443",
|
||||
"required": false,
|
||||
"value": "443"
|
||||
}
|
||||
},
|
||||
"image": "heroku/nodejs",
|
||||
"addons": [
|
||||
"heroku-redis"
|
||||
]
|
||||
}
|
17
build.sh
Executable file
17
build.sh
Executable file
@ -0,0 +1,17 @@
|
||||
echo "building client..."
|
||||
rm -rf client
|
||||
git clone https://github.com/darkwire/darkwire-client.git client
|
||||
cd client
|
||||
yarn --production=false
|
||||
REACT_APP_API_HOST=$API_HOST \
|
||||
REACT_APP_API_PROTOCOL=$API_PROTOCOL \
|
||||
REACT_APP_API_PORT=$API_PORT \
|
||||
yarn react-scripts build
|
||||
cd ../
|
||||
|
||||
echo "building server..."
|
||||
rm -rf server
|
||||
git clone https://github.com/darkwire/darkwire-server.git server
|
||||
cd server
|
||||
yarn --production=false
|
||||
yarn build
|
23
package.json
Normal file
23
package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "darkwire.io",
|
||||
"version": "2.0.0",
|
||||
"description": "encrypted web chat",
|
||||
"main": "index.js",
|
||||
"repository": "https://github.com/darkwire/darkwire.io.git",
|
||||
"engines": {
|
||||
"yarn": "1.x"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Daniel Seripap"
|
||||
},
|
||||
{
|
||||
"name": "Alan Friedman"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "./build.sh",
|
||||
"start": "cd server && CLIENT_DIST_DIRECTORY='../client/build' yarn start"
|
||||
}
|
||||
}
|
21
readme.md
21
readme.md
@ -4,6 +4,8 @@
|
||||
|
||||
Simple encrypted web chat. Powered by [socket.io](http://socket.io), the [web cryptography API](https://developer.mozilla.org/en-US/docs/Web/API/Window/crypto). This project is an example of how client side encryption works and how you can integrate it as a chat service.
|
||||
|
||||
[](https://heroku.com/deploy)
|
||||
|
||||
### Darkwire Server
|
||||
|
||||
Darkwire server is a Node.js application that requires redis.
|
||||
@ -35,6 +37,25 @@ environment:
|
||||
- API_PORT=3000
|
||||
```
|
||||
|
||||
### Production
|
||||
|
||||
#### Build
|
||||
|
||||
This command will pull server and client repos down and create production builds of each.
|
||||
|
||||
```
|
||||
$ yarn
|
||||
$ yarn build
|
||||
```
|
||||
|
||||
#### Start server
|
||||
|
||||
This will start a production server.
|
||||
|
||||
```
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
### Contributing to Darkwire
|
||||
|
||||
Run `setup-dev.sh` to automatically clone server/client files and install dependencies, or clone the client and server repositories.
|
||||
|
Loading…
x
Reference in New Issue
Block a user