Sign inSign up

therafk/app-st

By therafk

•Updated almost 2 years ago

App to test kubernetes flow from ingress to DB and back

Image
Developer tools
Web servers
0

63

therafk/app-st repository overview

App:

FROM python:3.10-slim
WORKDIR /app
RUN pip3 install streamlit
RUN pip3 install mysql-connector-python   #MySQL8 compatible
COPY main.py .
EXPOSE 8501
ENTRYPOINT ["streamlit","run","main.py","--server.port=8501","--server.address=0.0.0.0"]

Creds:

streamlit_host = os.environ.get('ST_HOST')
streamlit_password = os.environ.get('ST_PASSWORD')

Need a db:

CREATE USER st_user@'%' IDENTIFIED by '<PASS>';
GRANT ALL ON st_crud_db.st_users TO st_user@'%';
ᅳᅳᅳᅳᅳ
CREATE DATABASE IF NOT EXISTS st_crud_db;
USE st_crud_db;
CREATE TABLE IF NOT EXISTS `st_users` (
  `id` tinyint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  `email` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`));
ᅳᅳᅳᅳᅳ
INSERT INTO st_users(name,email) VALUES("test1", "[email protected]");
SELECT * FROM st_crud_db.st_users;

Tag summary

Content type

Image

Digest

sha256:35b00bec3…

Size

311.8 MB

Last updated

almost 2 years ago

docker pull therafk/app-st:0.1