First version of streamlit on mollier

This commit is contained in:
Guillem Borrell 2022-09-02 00:47:19 +02:00
parent 908cad3040
commit 143b73414f
9 changed files with 52 additions and 2 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
env/

View file

@ -0,0 +1 @@
{"id":"d9d094de-9912-4ed4-b4f4-e055f32b2cf3","updated":"2022-08-30T17:29:21.405701","stage":"sandbox","tenant_id":"4a31a0c5-68a7-44bb-baea-aa6d122e1b95","name":"streamlit"}

11
.mollier/frpc.ini Normal file
View file

@ -0,0 +1,11 @@
[common]
server_addr = proxy.mollier.dev
server_port = 7000
[sandbox-482d651d-d7af-4bc9-b449-bcf4b820bbfd]
type = tcp
local_ip = 127.0.0.1
local_port = 8501
remote_port = 10000
use_encryption = true
use_compression = true

1
.mollier/sandbox.json Normal file
View file

@ -0,0 +1 @@
{"id": "482d651d-d7af-4bc9-b449-bcf4b820bbfd", "updated": "2022-09-01T14:20:39.342440", "stage": "sandbox", "proxy_port": 10000, "connection": "inbound", "resource": "custom", "application_id": "d9d094de-9912-4ed4-b4f4-e055f32b2cf3"}

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM python:3.10
RUN mkdir /opt/mollier
COPY . /opt/mollier
WORKDIR /opt/mollier
RUN pip install --upgrade pip
RUN pip install -e git+https://guillem:4373375038e09b91e5282e72342fb8d369cef8f6@git.guillemborrell.es/mollier/mollier.git@main#egg=mollier
RUN pip install -r requirements.txt
RUN useradd -m --system --user-group mollier
RUN chown -R mollier:mollier /opt/mollier
USER mollier
CMD ph serve "streamlit run hello.py"

View file

@ -1,3 +1,17 @@
# streamlit # mollier/streamlit
Streamlit application running on mollier Streamlit application running on mollier
## Install and run locally
ˋˋˋ
pip install -r requirements.txt
ph serve "streamlit run hello.py
ˋˋˋ
## Build and run a container image
ˋˋˋ
docker build . -t mollier-streamlit
docker run mollier-streamlit
ˋˋˋ

3
hello.py Normal file
View file

@ -0,0 +1,3 @@
import streamlit as st
st.write("Hello from streamlit")

6
mollier.json Normal file
View file

@ -0,0 +1,6 @@
{
"runtime": "docker",
"layout": "container",
"port": 8501,
"entrypoint": "entrypoint.sh"
}

2
requirements.txt Normal file
View file

@ -0,0 +1,2 @@
streamlit
mollier