This repository has been archived by the owner on Nov 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to Vapor 3, User Permissions, Deleting Faxes and Messages
- Loading branch information
1 parent
e7fe6c2
commit ad0589d
Showing
82 changed files
with
5,462 additions
and
2,474 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM ubuntu:16.04 | ||
|
||
LABEL maintainer="bludesign" | ||
|
||
# Set Default Timezone | ||
RUN echo GMT > /etc/timezone | ||
|
||
# Install CURL and tzdata | ||
RUN apt-get update && \ | ||
apt-get -y install curl libcurl4-openssl-dev tzdata && \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# Configure tzdata | ||
RUN dpkg-reconfigure -f noninteractive tzdata | ||
|
||
# Get Vapor repo including Swift | ||
RUN curl -sL https://apt.vapor.sh | bash; | ||
|
||
# Installing Swift & Vapor | ||
RUN apt-get update && \ | ||
apt-get -y install swift vapor && \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
# Clone and build Reaumur | ||
RUN git clone https://github.com/bludesign/FaxServer.git | ||
WORKDIR "/FaxServer" | ||
RUN vapor build --release --verbose | ||
|
||
# Serve | ||
CMD bash -c ".build/release/App" |
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,24 +1,46 @@ | ||
// swift-tools-version:4.0 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Server", | ||
targets: [ | ||
Target(name: "Server"), | ||
Target(name: "App", dependencies: ["Server"]) | ||
], | ||
dependencies: [ | ||
.Package(url: "https://github.com/vapor/vapor.git", majorVersion: 2), | ||
.Package(url: "https://github.com/vapor/leaf-provider.git", majorVersion: 1), | ||
.Package(url: "https://github.com/vapor/validation.git", majorVersion: 1), | ||
.Package(url: "https://github.com/OpenKitten/MongoKitten.git", majorVersion: 4), | ||
.Package(url: "https://github.com/bludesign/vapor-apns", majorVersion: 2) | ||
.package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "3.0.0")), | ||
.package(url: "https://github.com/vapor/jwt.git", .upToNextMajor(from: "3.0.0-rc")), | ||
.package(url: "https://github.com/vapor/leaf.git", .upToNextMajor(from: "3.0.0-rc")), | ||
.package(url: "https://github.com/vapor/console.git", .upToNextMajor(from: "3.0.0")), | ||
.package(url: "https://github.com/vapor/websocket", .upToNextMajor(from: "1.0.0")), | ||
.package(url: "https://github.com/vapor/validation.git", .upToNextMajor(from: "2.0.0")), | ||
.package(url: "https://github.com/vapor-community/clibressl.git", .upToNextMajor(from: "1.0.0")), | ||
.package(url: "https://github.com/vapor-community/copenssl.git", .upToNextMajor(from: "1.0.0-rc")), | ||
.package(url: "https://github.com/OpenKitten/MongoKitten.git", .upToNextMajor(from: "4.0.0")), | ||
.package(url: "https://github.com/BrettRToomey/Jobs.git", .upToNextMajor(from: "1.0.0")), | ||
.package(url: "https://github.com/reaumur/CCurl.git", .upToNextMajor(from: "1.0.0")), | ||
.package(url: "https://github.com/tadija/AEXML.git", .upToNextMajor(from: "4.0.0")) | ||
], | ||
exclude: [ | ||
"Config", | ||
"Deploy", | ||
"Public", | ||
"Resources", | ||
"Tests", | ||
"Database" | ||
targets: [ | ||
.target(name: "Server", | ||
dependencies: [ | ||
"Vapor", | ||
"JWT", | ||
"Leaf", | ||
"Console", | ||
"WebSocket", | ||
"Validation", | ||
"CLibreSSL", | ||
"COpenSSL", | ||
"MongoKitten", | ||
"Jobs", | ||
"CCurl", | ||
"AEXML" | ||
], | ||
exclude: [ | ||
"Config", | ||
"Deploy", | ||
"Public", | ||
"Resources", | ||
"Tests", | ||
"Database" | ||
]), | ||
.target(name: "App", dependencies: ["Server"]) | ||
] | ||
) |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<img src="http://img.shields.io/badge/api-documentation-92A8D1.svg" alt="API Documentation"> | ||
</a> | ||
<a href="https://vapor.codes/"> | ||
<img src="https://img.shields.io/badge/vapor-2.0-blue.svg" alt="Vapor"> | ||
<img src="https://img.shields.io/badge/vapor-3.0-blue.svg" alt="Vapor"> | ||
</a> | ||
<a href="LICENSE"> | ||
<img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License"> | ||
|
@@ -32,13 +32,13 @@ The easiest way to install is with [Docker](https://www.docker.com) | |
cd FaxServer | ||
docker-compose up | ||
|
||
After the Vapor is finished building the (~5-10min) the server will be running at [http://127.0.0.1:8080](http://127.0.0.1:8080) | ||
After starting the server will be running at [http://127.0.0.1:8080](http://127.0.0.1:8080) | ||
|
||
To run the server in the background run `docker-compose up -d` | ||
|
||
#### Manually | ||
|
||
If it is not already installed install [MongoDB](https://docs.mongodb.com/manual/installation/) and configure the connection settings in the [/Config/mongo.json](./Config/mongo.json) file. | ||
If it is not already installed install [MongoDB](https://docs.mongodb.com/manual/installation/) if you are using authentication or a non-standard port set it with the `MONGO_HOST`, `MONGO_PORT`, `MONGO_USERNAME`, `MONGO_PASSWORD` environment variables. | ||
|
||
Next install Vapor and Swift here for [macOS](https://docs.vapor.codes/2.0/getting-started/install-on-macos/) or [Ubuntu](https://docs.vapor.codes/2.0/getting-started/install-on-ubuntu/). | ||
|
||
|
@@ -47,9 +47,9 @@ Then build and run the project: | |
git clone --depth=1 [email protected]:bludesign/FaxServer.git | ||
cd FaxServer | ||
vapor build --release | ||
vapor run serve --env=production --release | ||
.build/release/App | ||
|
||
The server will now be running at [http://127.0.0.1:8080](http://127.0.0.1:8080) | ||
The server will now be running at [http://127.0.0.1:8080](http://127.0.0.1:8080). Note running the server with `vapor run serve` will not work it must be run directly with the `App` in `.build/release` directory. | ||
|
||
### 🚀 Deploy | ||
|
||
|
@@ -92,6 +92,7 @@ First visit the Fax Server's address and register a new user account after you c | |
|
||
> SMS messages can only be received from Nexmo so no accounts need to be added in Fax Server to receive messages. | ||
- In your Nexmo account settings under API settings make sure the HTTP method is set to POST. | ||
- Under Numbers in Nexmo set the SMS webhook URL to `https://(Server Address Here)/message/nexmo` | ||
- Nexmo must be enabled in Fax Server settings if it has been disabled. | ||
|
||
|
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
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
Oops, something went wrong.