Update some meta files in the frontend directory to be the same as in the backend directory
Implement docker-compose.yaml to manage backend/frontend containers
How to test
Run Crux application
% cd environments/cpu
% sudo docker compose up -d
--
# Under the frontend container
$ poetry install
$ make run-frontend
poetry run streamlit run src/test_streamlit.py --server.port 8501
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://172.22.0.2:8501
--
# Under the backend container
$ poetry install
$ make run-backend
poetry run gunicorn 'src.app:main' -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000 -t 60 --log-level info
[2023-04-29 13:50:28 +0000] [1952] [INFO] Starting gunicorn 20.1.0
[2023-04-29 13:50:28 +0000] [1952] [INFO] Listening at: http://0.0.0.0:8000 (1952)
[2023-04-29 13:50:28 +0000] [1952] [INFO] Using worker: uvicorn.workers.UvicornWorker
[2023-04-29 13:50:28 +0000] [1971] [INFO] Booting worker with pid: 1971
[2023-04-29 13:50:28 +0000] [1971] [WARNING] ASGI app factory detected. Using it, but please consider setting the --factory flag explicitly.
[2023-04-29 13:50:28 +0000] [1971] [INFO] Started server process [1971]
[2023-04-29 13:50:28 +0000] [1971] [INFO] Waiting for application startup.
[2023-04-29 13:50:28 +0000] [1971] [INFO] Application startup complete.
To check if the frontend works fine, visit http://localhost:8501. You will see the page like the following.
To check if the backend works fine, visit http://localhost:8000/docs. You will see the page like the following.
You can also try health endpoint by pushing "Try it out" button and "Execute" button.
After test please don't forget to stop or down containers.
Issue URL
4
Change overview
docker-compose.yaml
to manage backend/frontend containersHow to test
To check if the frontend works fine, visit![スクリーンショット 2023-04-29 231533](https://user-images.githubusercontent.com/61688218/235307533-6aa4bce8-9668-4a5d-868b-b3e98d2a3063.png)
http://localhost:8501
. You will see the page like the following.To check if the backend works fine, visit
You can also try ![Screenshot from 2023-04-27 01-29-00](https://user-images.githubusercontent.com/21344007/234641704-79aec9c8-5dea-444d-897e-6c60eee8a3b9.png)
http://localhost:8000/docs
. You will see the page like the following.health
endpoint by pushing "Try it out" button and "Execute" button.After test please don't forget to stop or down containers.
Note for reviewers
NA