Skip to content

Commit

Permalink
Increase form data limit to 128KiB (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Nov 25, 2022
1 parent 346d099 commit 1cab3bc
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 74 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Choose nightly
run: rustup update && cargo update && rustup override set nightly
- name: Set up rust nightly
run: |
rustup update
cargo update
rustup override set nightly
- name: Build
- name: Compile
run: cargo build --verbose
13 changes: 8 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# IDE
/.idea

# Generated by Cargo
# will have compiled files and executables
/target/
# Compiled
/target
/md-to-pdf

# These are backup files generated by rustfmt
# Generated by rustfmt
**/*.rs.bk

# Individual
docker-compose.override.yml

# Generated
*.pdf
.bash_history
md-to-pdf
78 changes: 46 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ USER rocket
WORKDIR /home/rocket

COPY static /home/rocket/static
COPY Rocket.toml /home/rocket/Rocket.toml
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ dcrust=$$( [ -f /.dockerenv ] && echo "" || echo "docker-compose exec rust")
dcpandoc=$$( [ -f /.dockerenv ] && echo "" || echo "docker-compose exec pandoc")

.PHONY: it
it: fmt build test ## Peform common targets
it: fmt target/debug test ## Perform common targets

.PHONY: help
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(firstword $(MAKEFILE_LIST)) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: setup
setup: dc-build cargo-deps build ## Setup the local environment
setup: dc-build cargo-deps ## Set up the local environment

.PHONY: dc-build
dc-build: ## Build the local dev image
Expand All @@ -23,8 +23,7 @@ up: ## Bring up the containers
cargo-deps: up ## Reinstall cargo dependencies
${dcrust} cargo update

.PHONY: build
build: up ## Reinstall cargo dependencies
target/debug: up src ## Compile
${dcrust} cargo build

.PHONY: rust
Expand All @@ -36,11 +35,11 @@ pandoc: up ## Enter an interactive shell into the pandoc container
${dcpandoc} bash

.PHONY: serve
serve: up ## Serve the compiled application
serve: up target/debug ## Serve the compiled application
${dcpandoc} target/debug/md-to-pdf

.PHONY: fmt
fmt: ## Format the rust code
fmt: up ## Format the rust code
${dcrust} cargo fmt

.PHONY: test
Expand Down
3 changes: 3 additions & 0 deletions Rocket.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[development]
address = "0.0.0.0"

[global.limits]
forms = 131072
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
- ./:/workdir
working_dir: /workdir
tty: true

pandoc:
build:
context: .
Expand Down

0 comments on commit 1cab3bc

Please sign in to comment.