From e16a565c0c2d9723e6a6aeb8f47da6ed3978308f Mon Sep 17 00:00:00 2001 From: calm-steam Date: Tue, 18 Feb 2025 20:06:47 +0530 Subject: [PATCH 1/4] add Dockerfile --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..114b0db --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.10-alpine + +ARG game_server_directory="/usr/src/GameServerSupervisor" + +RUN mkdir -p $game_server_directory + +WORKDIR $game_server_directory + +COPY . $game_server_directory + +RUN pip install --upgrade pip +RUN pip install --no-cache-dir -r requirements.txt + +EXPOSE 80 From 2e114fef44d527b6b35f14cfb52323f422352876 Mon Sep 17 00:00:00 2001 From: calm-steam Date: Tue, 18 Feb 2025 23:54:47 +0530 Subject: [PATCH 2/4] change variable name --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 114b0db..48320be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM python:3.10-alpine -ARG game_server_directory="/usr/src/GameServerSupervisor" +ARG supervisor_dir="/usr/src/GameServerSupervisor" -RUN mkdir -p $game_server_directory +RUN mkdir -p $supervisor_dir -WORKDIR $game_server_directory +WORKDIR $supervisor_dir -COPY . $game_server_directory +COPY . $supervisor_dir RUN pip install --upgrade pip RUN pip install --no-cache-dir -r requirements.txt From bfac5a22ebd78fe938ed26d98bbd6046fc8fcebc Mon Sep 17 00:00:00 2001 From: calm-steam Date: Wed, 19 Feb 2025 00:49:39 +0530 Subject: [PATCH 3/4] modify readme --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1b69c10..03fa188 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,23 @@ # GibCasa GameServerSupervisor ## Table of Contents -- [Prerequisites](#prerequisites) -- [Installation](#installation) +- [Installation using venv](#installation-using-venv) + - [Prerequisites](#prerequisites) + - [Installation](#installation) +- [Installation using Podman](#installation-using-podman) + - [Prerequisites](#prerequisites-1) + - [Installation](#installation-1) - [Usage](#usage) - [Contributing](#contributing) - [License](#license) -## Prerequisites +## Installation using venv + +### Prerequisites Python 3.10 or above -## Installation +### Installation 1. Clone the repository: ```bash @@ -45,6 +51,42 @@ Python 3.10 or above ```bash ./manage.py runserver ``` +## Installation using Podman + +### Prerequisites + +Podman + +### Installation + +1. Clone the repository: +```bash + git clone https://git.com.de/GibCasa/GameServerSupervisor +``` +2. Build the image: +```bash + podman build . -t supervisor-image +``` +3. Run a container in an interactive shell: +```bash + podman run -it --network=host localhost/supervisor-image sh +``` +4. Run tests: +```bash + ./manage.py test +``` +5. Run migrations: +```bash + ./manage.py migrate +``` +6. Create admin user: +```bash + ./manage.py createsuperuser +``` +7. Run server: +```bash + ./manage.py runserver +``` ## Usage From 0b622ce3eaabf456e5dc11c75334206962bd47f5 Mon Sep 17 00:00:00 2001 From: calm-steam Date: Sun, 23 Feb 2025 14:38:28 +0530 Subject: [PATCH 4/4] add step to sync host --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 03fa188..abaa049 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,13 @@ Podman ```bash ./manage.py runserver ``` +------------- + +To live sync host directory with container folder, in Step 3: +```bash +podman run --network=host -itv /host/src/path:/usr/src/GameServerSupervisor supervisor-image sh +``` +`/host/src/path` is the absolute path to the repository in the host machine. ## Usage