15 Commits

Author SHA1 Message Date
1e75df8c33
Try to make these weird templates safer
I think we need to check these snippets rather carefully
somepoint not too far

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-23 09:57:49 +05:30
87feb8fda6
Improves handling port mapping
switched port field to a JSONField
adds a helper function to display server port mapping in admin
launching a container will map the ports appropriately
Instead of typing json to map ports we have a widget
replaced by such text fields. where one can + button to add or
- to remove
i.e.
 [container_port/proto]:[host_port]
At first port was an IntegerField.
Hence i added a manual migration which is the latest one
to get them  to be default:port(old value)

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-23 03:08:36 +05:30
2fbf160920
Fix thumbnails
Repaired media upload thumbnails giving 404

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-21 00:32:49 +05:30
0be9090981
DRY
Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-20 23:21:28 +05:30
851496a0af
Rm commented code
Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-17 19:37:59 +05:30
88f5614cd4
Fix launch logic
Have cleaned up redundant logic used for testing
it ruined my life today.
Port mapping works but it's simply picking it up from
a single integer field. We might have to expand on this
logic for multi port mappings per instance.

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-16 21:01:58 +05:30
77ab980fd4
Create Frontend
Create views and templates to render the views for a list of games
And for it to show if server is running for the game selected.

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-04-16 14:30:51 +05:30
9cec170f62
add webpanel/test_models.py as example 2025-02-16 16:05:47 +05:30
98b9574c67
delete webpanel/tests.py 2025-02-16 16:05:31 +05:30
a13df3aea4
Rm references to "docker"
Closes #13
Required a change in name of two fields in the Server model.

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-02-09 22:35:24 +05:30
81787bee84
Fix sync_status & remove 'docker' references
sync_status: fixing path to podman.sock
fix several strings and func names with 'docker' in them

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-02-01 07:02:09 +05:30
c944c58f22
Switch from docker to podman
while it works to launch, stop and remove containers,
fixing strings and func and var names is yet to be done

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-02-01 06:06:22 +05:30
53a59f4f27
Add setup steps
Add setup steps in readme. and include stray changes from a template smh

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-01-21 03:21:05 +05:30
10592cb2d2
Configure and test Game Server Launch
Connected to hld2m-server successfully. Hardcoded `network_mode='host'`
Which isn't viable moving forwards.

Current Status:
Frontend : Active Servers show
Backend: Have configured admin.py utils.py and models.py
to grant us the ability to launch a docker image with a command
and tested client connection.
Server Online status works
launch, stop, remove (with force stop) works.

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-01-20 22:42:01 +05:30
5da520bc9d
Initial Commit
Base Functionality added. Adding a Server with
the image port  ip and other params specified
will spawn a container and one can manage the
lifecycle in the admin panel and the game server
detail view updates based on container status.

Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
2025-01-20 05:02:25 +05:30