Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/screenbreak/SingleFile-dockerized
SingleFile docker implementation providing access via CLI and WEB service
https://github.com/screenbreak/SingleFile-dockerized
Last synced: 12 days ago
JSON representation
SingleFile docker implementation providing access via CLI and WEB service
- Host: GitHub
- URL: https://github.com/screenbreak/SingleFile-dockerized
- Owner: screenbreak
- Created: 2020-09-13T09:39:32.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T00:19:56.000Z (5 months ago)
- Last Synced: 2024-08-01T16:55:19.125Z (3 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 35
- Watchers: 2
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SingleFile-dockerized
SingleFile docker implementation providing access via either a dockerized-CLI or a WEB service.Prototype work:
https://github.com/gildas-lormeau/SingleFile## Usage
### Option #1: Run it directly from your docker host:
```bash
docker pull screenbreak/singlefile-dockerized
docker run -it screenbreak/singlefile-dockerized http://www.example.com/
```
You will get the HTML output of SingleFile in your console stdout.### Option #2: Deploy it as a webserver in a docker-compose.yml:
```yaml
version: '3'
services:
singlefile:
container_name: singlefile
image: screenbreak/singlefile-dockerized
entrypoint: python3
command: webserver.py
expose:
- 80
```Then any HTTP POST on port 80 with url parameter will respond with the HTML output of SingleFile in the payload:
```bash
curl -d 'url=http://www.example.com/' singlefile:80
```### Output example:
```html
Example Domainbody{background-color:#f0f0f2;margin:0;padding:0;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI","Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif}div{width:600px;margin:5em auto;padding:2em;background-color:#fdfdff;border-radius:0.5em;box-shadow:2px 3px 7px 2px rgba(0,0,0,0.02)}a:link,a:visited{color:#38488f;text-decoration:none}@media (max-width:700px){div{margin:0 auto;width:auto}}
Example Domain
This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.
```