Project Code: https://github.com/venajustin/jsmge
Each of the following folders is set up with a Dockerfile that defines the container image that will be built. compose.yaml defines settings so that the docker compose script can be used to build and deploy containers. The server-output image is not included in this script and must be built seperately, using a python script.
- editor
- React application using the Vue framework
- Allows users to create and edit games in an interactive code editor, file management environment with a preview
- nginx-config
- nginx routing server for directing requests to docker containers
- Folder contains nginx configuration file
- postgres-config
- PostgreSQL relational database
- Folder contains configuration and startup sql scripts to populate the database on a new host computer.
- server-output
- The engine server backend that hosts user games.
- This is built as a node container and is instantiated at runtime for each user game.
- This server acts both as the backend for the development environment, and as a host when playing games.
- mgmtApi
- Flask web server that handles requests related to game management.
- This container has the ability to instantiate containers from the server-output image.
Install the following before proceeding
git clone https://github.com/venajustin/jsmge.gitor, if using ssh auth:
git clone git@github.com:venajustin/jsmgeWindows
py -m venv .venv.venv\Scripts\activate<-- Required each time you use a new terminal session
Mac / Linux
python3 -m venv .venvsource .venv/bin/activate<-- Required each time you use a new terminal session
For running the python api in development, on all platforms, after activating environment:
pip install -r ./requirements.txtEnsure that the docker daemon is running before running the following
Creating server-output docker image
cd mgmtApi
python start_node_img.pyBuilding Docker images for other server components
docker compose builddocker compose up -dThe editor can be accessed from port 80 on the host pc. For example http://localhost/ if you are connecting from a local browser.
- Stop all games in user games manager
- or stop containers manually with docker
- Run the following to bring down other components
docker compose down