Web site to introduce the laboratories of the Graduate School of Informatics, Osaka Metropolitan University, Japan.
Only docker
and docker-compose
commands are required. Please install these two commands according to Docker Documentation.
Note: Use port
8080
on localhost to access the launched Web site by default. If port8080
on your machine is inconvenient, please change all the8080
written in the following files as needed:
8080:80
in the filedocker-compose.yaml
http://localhost:8080
in the fileapp-python3/src/main.py
In the beginning, type the following command to start two containers: omu-nginx-container
and omu-python-container
, which will take tens of minutes to complete some jobs of downloading or creating a docker image, installing apt packages and pip modules, etc.
$ docker-compose up -d --build
Once two containers are successfully created, you can access the Web site. Try typing the following URL in the address bar of a web browser such as Google Chrome.
localhost:8080
or
http://localhost:8080
Note: If you do not have access to the launched Web site, please let us know via Univ. Email.
When you have access to the Web site, you can visit the introduction pages of Osaka Metropolitan University and the laboratories of Graduate School of Informatics. We hope you enjoy it.
At the end, type the following command to remove the containers and clean all the environment.
$ docker-compose down
Below is a brief description of the implementation details. Please read only the sections that interest you.
Logo | Virtual Background |
---|---|
![]() |
![]() |
This is an overview of the directory tree. Hence, only major files and directories are shown here.
. ├── app-python3 │ ├── src │ │ ├── main.py │ │ ├── (share-with-web) │ │ └── wordcloud_omu │ ├── Dockerfile │ └── requirements.txt ├── images ├── share ├── web-nginx │ ├── conf.d │ └── contents │ ├── img │ ├── index.html │ ├── (share-with-python) │ └── style.css ├── README.md └── docker-compose.yml
- Accessing port
8001
on the local host leads to port8080
onomu-python-container
. - The files you want to code such as
.py
will be stored in./app-python3/src
on the localhost which is bind-mounted into/opt
on the python container.
- Accessing port
8080
on the local host leads to port80
onomu-nginx-container
. - The files you want to code such as
.html
,.css
,.js
will be stored in./web-nginx/contents
on the localhost which is bind-mounted into/usr/share/nginx/html
on the nginx container.
- The contents of three directories
share
,share-with-web
andshare-with-python
are shared immediately.
- This is the directory for managing the python container.
- Use python v3.9 to use WordCloud library (though latest version is v3.11)
- The pip modules necessary to install are listed in
requirements.txt
. - In
main.py
, use FastAPI to have the python process run in the background by simply clicking on a URL embedded in the Web site. - Three main steps are required to create WordCloud image: scraping, morphological analysis, and WordCloud image creation.
run.sh
handles them all at once. - The created WordCloud image will be copied to the shared directory
share-with-web
.
- This is the directory for managing the nginx container.
- You can edit HTML, CSS, and JavaScript files in
contents
. - By configuration file
conf.d
, the nginx container also act as a reverse proxy to forward requests destined for the:8080/api
to the python container img
is the place to store the originally prepared images, whileshare-with-python
is the place to store the python products such as WordCloud image.