Last active
August 18, 2019 09:02
-
-
Save taufiqibrahim/93efc553ce1c6594259e9113916ddea5 to your computer and use it in GitHub Desktop.
Containers information stored as Django model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from dockerman.models import Container | |
@admin.register(Container) | |
class ContainerAdmin(admin.ModelAdmin): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DockerAppHost | DockerAppPort | AppMessage | |
---|---|---|---|
http://localhost | 5001 | Welcome to my app! I am running on http://localhost:5001 | |
http://localhost | 5002 | Welcome to my app! I am running on http://localhost:5002 | |
http://localhost | 5003 | Welcome to my app! I am running on http://localhost:5003 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Container(models.Model): | |
container_host = models.URLField() | |
container_port = models.PositiveIntegerField() | |
container_default_message = models.CharField( | |
max_length=255 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
INSTALLED_APPS = [ | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'dockerman', | |
] | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment