Skip to content

Commit 4b7c224

Browse files
committed
Pull in files from rust-actis-framework
0 parents  commit 4b7c224

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+5652
-0
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target

.env.docker

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
AUTH_SALT=CHANGEME
2+
DATABASE_CONNECTION=mysql
3+
DATABASE_URL=mysql://root:[email protected]:8889/rust-actix-framework?socket=/Applications/MAMP/tmp/mysql/mysql.sock
4+
JWT_EXPIRATION=24
5+
JWT_KEY=4125442A472D4B614E645267556B58703273357638792F423F4528482B4D6251
6+
REDIS_URL=127.0.0.1:6379
7+
RUST_BACKTRACE=1
8+
RUST_LOG="actix_web=info,actix_server=info,actix_redis=trace"
9+
SERVER=0.0.0.0:3000
10+
SESSION_KEY=4125442A472D4B614E645267556B58703273357638792F423F4528482B4D6251
11+
SESSION_NAME=auth
12+
SESSION_SECURE=false
13+
SESSION_TIMEOUT=20

.env.example

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
AUTH_SALT=CHANGEME
2+
DATABASE=mysql
3+
DATABASE_URL=mysql://root:[email protected]:8889/rust-actix-framework?socket=/Applications/MAMP/tmp/mysql/mysql.sock
4+
JWT_EXPIRATION=24
5+
JWT_KEY=4125442A472D4B614E645267556B58703273357638792F423F4528482B4D6251
6+
REDIS_URL=127.0.0.1:6379
7+
RUST_BACKTRACE=1
8+
RUST_LOG="actix_web=info,actix_server=info,actix_redis=trace"
9+
SERVER=127.0.0.1:3000
10+
SESSION_KEY=4125442A472D4B614E645267556B58703273357638792F423F4528482B4D6251
11+
SESSION_NAME=auth
12+
SESSION_SECURE=false
13+
SESSION_TIMEOUT=20

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/target
2+
.env
3+
.cargo

.travis.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: rust
2+
rust:
3+
- stable
4+
matrix:
5+
fast_finish: true
6+
cache: cargo
7+
env:
8+
global:
9+
- SERVER: 127.0.0.1:3000
10+
before_script:
11+
- sudo apt-get update
12+
script:
13+
- cargo build --verbose --all
14+
- SERVER=127.0.0.1:3000
15+
- cargo test --verbose --all

Cargo.lock

+3,117
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[package]
2+
name = "rust_actix_framework"
3+
version = "0.2.0"
4+
authors = ["David DiMaria <[email protected]>"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
actix = "0.9.0"
9+
actix-cors = "0.2.0"
10+
actix-files = "0.2.1"
11+
actix-identity = "0.2.1"
12+
actix-redis = "0.8.0"
13+
actix-rt = "1"
14+
actix-service = "1.0.5"
15+
actix-web = "2"
16+
argon2rs = "0.2.1"
17+
chrono = { version = "0.4", features = ["serde"] }
18+
derive_more = "0.15"
19+
diesel = { version = "1.4.0", features = ["chrono", "mysql", "postgres", "sqlite", "r2d2", "uuidv07"] }
20+
dotenv = "0.14"
21+
envy = "0.4"
22+
env_logger = "0.6"
23+
futures = "0.3.1"
24+
jsonwebtoken = "7"
25+
lazy_static = "1.4"
26+
listenfd = "0.3"
27+
log = "0.4"
28+
rayon = "1.0"
29+
redis-async = "0.6.1"
30+
r2d2 = "0.8"
31+
r2d2-diesel = "1.0.0"
32+
serde = "1.0"
33+
serde_derive = "1.0"
34+
serde_json = "1.0"
35+
uuid = { version = "0.7", features = ["serde", "v4"] }
36+
validator = "0.8.0"
37+
validator_derive = "0.8.0"
38+
39+
[dev-dependencies]
40+
actix-http-test = "0.2.0"
41+
42+
[features]
43+
cockroach = []
44+
mysql = []
45+
postgres = []
46+
sqlite = []
47+
default = ["mysql"]

Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ARG BASE_IMAGE=ekidd/rust-musl-builder:latest
2+
3+
# Our first FROM statement declares the build environment.
4+
FROM ${BASE_IMAGE} AS builder
5+
6+
# Add our source code.
7+
ADD . ./
8+
9+
# Fix permissions on source code.
10+
RUN sudo chown -R rust:rust /home/rust
11+
12+
# Build our application.
13+
RUN cargo build --release
14+
15+
# Now, we need to build our _real_ Docker container, copying in `rust_actix_framework`.
16+
FROM alpine:latest
17+
RUN apk --no-cache add ca-certificates
18+
COPY --from=builder \
19+
/home/rust/src/target/x86_64-unknown-linux-musl/release/rust_actix_framework \
20+
/usr/local/bin/
21+
CMD /usr/local/bin/rust_actix_framework

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 David D.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)