Added Docker and License

This commit is contained in:
Justine Pelletreau 2023-07-03 17:38:06 +02:00
parent e49efa4b64
commit 4716754aec
9 changed files with 49 additions and 3 deletions

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM debian:stable-slim
WORKDIR /opt
COPY --chown=root --chmod=0755 sqpad /opt/sqpad
RUN mkdir -p -m 0755 /opt/Files
RUN touch /opt/Files/posts.json
COPY --chown=root --chmod=0755 Files/* /opt/Files/
EXPOSE 8080
CMD ["/opt/sqpad"]

View File

@ -1,2 +1,5 @@
<br>
<hr>
<a href="https://gitea.squi.fr/Rust/SqPad">SqPad</a> by Squi
</body>
</html>

View File

@ -134,4 +134,6 @@
<input type="submit" value="submit">
</form>
</div>
<hr>
<a href="https://gitea.squi.fr/Rust/SqPad">SqPad</a> by Squi
<hr>

View File

@ -1,2 +0,0 @@
{"name":"llllllll","crypt":"U6O3QDZVQiFfRnj4aG0Exw==","date":"03/07/2023@16:39:26","id":790468326923469714}
{"name":"Hi","crypt":"2Mj3sF0C0loJjnWVgAB7tQ==","date":"03/07/2023@16:54:51","id":8071774849875630801}

22
License.txt Normal file
View File

@ -0,0 +1,22 @@
MIT License
Copyright (c) 2023 Justine PELLETREAU
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -4,6 +4,12 @@ A encrypted pastebin.
## Install
Juste compile and launch it in the same folder as "Files".
## Docker
Start by ![installing docker](https://docs.docker.com/engine/install/) if need be, then:
```
docker compose up -f docker-compose.yml -d
```
## Usage
Simply enter a note on the form on the main page. Once submitted, the note is encrypted using DES-256.

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
version: "3"
services:
sqpad:
image: sqpad
ports:
- "8080:8080"

BIN
sqpad Executable file

Binary file not shown.

BIN
src/.main.rs.swp Normal file

Binary file not shown.