mirror of
https://github.com/13hannes11/ics-proxy.git
synced 2024-09-06 08:01:41 +02:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b89e4af7ac | |||
| 074c194c0c | |||
| af1e32ac24 | |||
| 129481840f | |||
| 16cd3ca123 | |||
| 936c536cc0 | |||
| 4a8f9c1ab8 | |||
| 6bd3ef4537 | |||
| 7eabecf6b4 | |||
| 3d83a6761a | |||
|
|
ba11157687 | ||
| 1aa117a28f | |||
| f59b49b1ad | |||
| 36c01035d5 | |||
|
|
c38971af3a | ||
|
|
5f45e52fb9 | ||
|
|
e804305a68 |
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
2092
Cargo.lock
generated
2092
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
@@ -1,16 +1,16 @@
|
||||
[package]
|
||||
name = "ics-proxy"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
version = "0.1.2"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
actix-web = "3"
|
||||
uuid = { version = "0.8.2", features = ["v4"] }
|
||||
actix-web = "4.0"
|
||||
uuid = { version = "1.0", features = ["v4"] }
|
||||
url = "2.2"
|
||||
reqwest = { version = "0.11", features = ["blocking"] }
|
||||
tera = "1.12.1"
|
||||
tera = "1.15"
|
||||
dotenv = "0.15"
|
||||
|
||||
sqlx = { version = "0.4.2", features = [ "sqlite", "runtime-actix-native-tls" ] }
|
||||
sqlx = { version = "0.5", features = [ "sqlite", "runtime-actix-rustls" ] }
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FROM rust:1.54 as builder
|
||||
FROM rust:1.61 as builder
|
||||
RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /usr/src/ics-proxy
|
||||
COPY . .
|
||||
RUN cd db && ./create_db.sh
|
||||
RUN cargo install --path .
|
||||
|
||||
FROM debian:buster-slim
|
||||
FROM debian:stable-slim
|
||||
RUN apt-get update && apt-get install -y sqlite3 openssl ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR app
|
||||
COPY --from=builder /usr/local/cargo/bin/ics-proxy ./ics-proxy
|
||||
|
||||
14
README.md
14
README.md
@@ -1,6 +1,13 @@
|
||||
# ics-proxy
|
||||
|
||||
You can find a running instance of this code on [ics-proxy.de](https://ics-proxy.de). The docker image is published on [DockerHub](https://hub.docker.com/repository/docker/13hannes11/ics-proxy).
|
||||
You can find a running instance of this code on [ics-proxy.de](https://ics-proxy.de). The docker image is published on the [GitHub Container Registry](https://github.com/13hannes11/ics-proxy/pkgs/container/ics-proxy).
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
## Motivation
|
||||
|
||||
@@ -12,6 +19,11 @@ Additionally, each semester this needed to be done as well. I therefore created
|
||||
|
||||
The easiest way to build this repository is to use docker. You can simply run `docker build -t ics-proxy .`
|
||||
|
||||
Alternatively you can build and run a local dev version with `docker-compose -f docker-compose.dev.yml up`.
|
||||
|
||||
## Deployment
|
||||
|
||||
To deploy you can simply use the `docker-compose.yml` file.
|
||||
|
||||
## Contributing
|
||||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
|
||||
|
||||
12
docker-compose.dev.yml
Normal file
12
docker-compose.dev.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
services:
|
||||
ics-proxy:
|
||||
container_name: ics-proxy
|
||||
build: .
|
||||
env_file: .env
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- database:/app/db
|
||||
volumes:
|
||||
database:
|
||||
@@ -2,6 +2,7 @@ use std::collections::HashMap;
|
||||
use url::Url;
|
||||
|
||||
use actix_web::http::StatusCode;
|
||||
use actix_web::web::Data;
|
||||
use actix_web::{error, web, App, Error, HttpRequest, HttpResponse, HttpServer, Responder, Result};
|
||||
use sqlx::{Pool, Sqlite, SqlitePool};
|
||||
use tera::Tera;
|
||||
@@ -299,9 +300,9 @@ async fn main() -> std::io::Result<()> {
|
||||
let tera = Tera::new("templates/**/*.html").unwrap();
|
||||
|
||||
App::new()
|
||||
.data(db_pool.clone()) // pass database pool to application so we can access it inside handlers
|
||||
.data(tera)
|
||||
.data(conf.clone())
|
||||
.app_data(Data::new(db_pool.clone())) // pass database pool to application so we can access it inside handlers
|
||||
.app_data(Data::new(tera))
|
||||
.app_data(Data::new(conf.clone()))
|
||||
.route("/{id}/events.ics", web::get().to(make_ics_request))
|
||||
.service(web::resource("/").route(web::get().to(index)))
|
||||
.service(web::resource("/edit").route(web::get().to(edit_page)))
|
||||
|
||||
Reference in New Issue
Block a user