mirror of
https://codeberg.org/gigirassy/teletraan.git
synced 2026-08-30 23:27:39 +00:00
Update README.md
This commit is contained in:
@@ -18,6 +18,8 @@ it is compiled with ``panic=immediate-abort``.
|
||||
|
||||
## example usage
|
||||
|
||||
### compose file
|
||||
|
||||
in a compose file, you can use teletraan to run your static site stack:
|
||||
|
||||
```yaml
|
||||
@@ -48,7 +50,48 @@ services:
|
||||
- "127.0.0.1:9904:3000"
|
||||
```
|
||||
|
||||
and then use external caddy or nginx to reverse proxy the host ports.
|
||||
use external caddy or nginx to reverse proxy the host ports either way.
|
||||
|
||||
|
||||
### dockerfile
|
||||
an image of cinny can be easily and quickly built with teletraan as the server. we just need to specify ``CMD ["-s"]`` at the end.
|
||||
|
||||
```
|
||||
FROM ghcr.io/cinnyapp/cinny:v4.12.3 AS source
|
||||
|
||||
FROM codeberg.org/gigirassy/teletraan:latest AS runtime
|
||||
|
||||
COPY --from=source /usr/share/nginx/html .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["-s"]
|
||||
```
|
||||
|
||||
a simple image for your static site can be built easily. you dont have to specify a cmd!
|
||||
|
||||
```
|
||||
FROM codeberg.org/gigirassy/teletraan:latest
|
||||
|
||||
COPY /static .
|
||||
|
||||
EXPOSE 3000
|
||||
```
|
||||
|
||||
if your static site is made of txt files, use the ``CMD ["-i"]`` flag to serve your index.txt file in the webroot as the index.
|
||||
|
||||
```
|
||||
FROM codeberg.org/gigirassy/teletraan:latest
|
||||
|
||||
COPY /doc .
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["-i"]
|
||||
```
|
||||
|
||||
use external caddy or nginx to reverse proxy the host ports either way.
|
||||
|
||||
|
||||
## license
|
||||
|
||||
|
||||
Reference in New Issue
Block a user