moved podman-compose up one level
This commit is contained in:
parent
d50e79423f
commit
15dd9dfd60
@ -1,6 +1,8 @@
|
||||
DEBUG=1
|
||||
SECRET_KEY=Express.123
|
||||
DJANGO_ALLOWED_HOSTS=192.168.0.234 localhost 127.0.0.1 [::1]
|
||||
DJANGO_SUPERUSER_USERNAME=admin
|
||||
DJANGO_SUPERUSER_PASSWORD=GoodMorning123!
|
||||
POSTGRESQL_ENGINE=django.db.backends.postgresql
|
||||
POSTGRESQL_DATABASE=main_db
|
||||
POSTGRESQL_USER=admin
|
||||
|
||||
39
Read.me
39
Read.me
@ -1,24 +1,37 @@
|
||||
Read.me
|
||||
Provide code for following program
|
||||
|
||||
Program runs on 5 containers using podman-dockerise
|
||||
Program runs on multiple containers using podman-dockercompose files and instances
|
||||
|
||||
First container is latest postgresql with pgadmin
|
||||
Second container is latest couchdb
|
||||
Third container is latest django
|
||||
Fourth container is latest nodejs with latest react and latest redux
|
||||
Fifth container is latest nginx which contains the landing page and serves static content
|
||||
Here is the application structure
|
||||
p00003 (venv)
|
||||
-p00003django
|
||||
-DockerFile
|
||||
-.entrypoint.sh
|
||||
-JenkinsFile
|
||||
-main (app1 - projects)
|
||||
-accounts (app2 - apis for authentication and authorization)
|
||||
-project_management
|
||||
-requirements.txt
|
||||
-manage.py
|
||||
-p00003remix
|
||||
-DockerFile
|
||||
-JenkinsFile
|
||||
-requirements.txt
|
||||
-.entrypoint.sh
|
||||
-podman-compose.yml (provides hashicorp p00003vault, p00003postgres, p00003pgadmin, p00003couchDB, p00003nginx, p00003django (depends on p00003postgres_), and p00003remix (depends on p00003couchDB))
|
||||
|
||||
|
||||
Data is persisted in NFS file structure to be provided.
|
||||
|
||||
Program is wrapped with nginx static pages with reflex components embeded in it.
|
||||
|
||||
|
||||
Application requires an email which will require confirmation through sending and confirming email. Once email is confirmed certificates and tokens will be generated and sent to safekeep to the first registered user. This user is also given full admin access to the application environment. I don't know how hashicorp works but there needs to be a possibility to regenerate the tokens they are misplaced or forgotten. But with each regeneration there needs to be an id that can't be changed so administrator knows that it was done.
|
||||
|
||||
All dynamic data is stored in an external nfs server defined in a configuration file for main django application.
|
||||
Initial data that containers need is stored locally.
|
||||
|
||||
Program starts by welcoming user and displaying login or register page served by nginx.
|
||||
Registration is by email which by default is noone@nowhere.net
|
||||
Program will use a certificate system to secure communication between containers where root certificate passkey is the secret in settings page of the main django application
|
||||
|
||||
Django main application and apis it serves:
|
||||
Djano main application is the user directory, project directory, and RBAC definitions directory.
|
||||
First time running the django application default user is admin and password is "GoodMorning123!" which has full administrative rights.
|
||||
First time admin login to the django application default landing page is the program configuration page which has following required fields to complete:
|
||||
-Company Name (only one company can exist but subsidieries can be created - 256 characters maximum)
|
||||
-First subsidiary name (organization unit responsible for administring the program - 256 characters maximum)
|
||||
|
||||
@ -5,4 +5,6 @@ urlpatterns = [
|
||||
path('api/login/', UserLoginView.as_view(), name='login'),
|
||||
path('api/logout/', UserLogoutView.as_view(), name='logout'),
|
||||
path('api/register/', UserRegistrationView.as_view(), name='welcome'),
|
||||
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||||
path('api/token/refresh', TokenRefreshView.as_view(), name='token_fresh'),
|
||||
]
|
||||
@ -1,65 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
p00003postgres:
|
||||
container_name: p00003postgres
|
||||
image: postgres:16.6
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: US/Eastern
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- backend
|
||||
env_file:
|
||||
- ./.p00003postgres.env
|
||||
|
||||
p00003pgadmin:
|
||||
container_name: p00003pgadmin
|
||||
image: dpage/pgadmin4:latest
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: US/Eastern
|
||||
ports:
|
||||
- "5080:80"
|
||||
depends_on:
|
||||
- p00003postgres
|
||||
networks:
|
||||
- backend
|
||||
env_file:
|
||||
- ./.p00003pgadm.env
|
||||
volume:
|
||||
- ./pgadmin_data:/var/lib/pgadmin
|
||||
|
||||
p00003django:
|
||||
container_name: p00003django
|
||||
environment:
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
TZ: US/Eastern
|
||||
build: ./
|
||||
volumes:
|
||||
- ./:/usr/src/app/
|
||||
ports:
|
||||
- "8000:8000"
|
||||
depends_on:
|
||||
- p00003postgres
|
||||
networks:
|
||||
- backend
|
||||
env_file:
|
||||
- ./.p00003django.env
|
||||
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
pgadmin_data:
|
||||
p0003django:
|
||||
|
||||
networks:
|
||||
backend:
|
||||
driver: bridge
|
||||
|
||||
@ -34,6 +34,7 @@ ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ")
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'rest_framework',
|
||||
'rest_framework_simplejwt',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
@ -116,6 +117,9 @@ REST_FRAMEWORK = {
|
||||
# or allow read-only access for unauthenticated users.
|
||||
'DEFAULT_PERMISSION_CLASSES': [
|
||||
'rest_framework.permissions.DjangoModelPermissions',
|
||||
],
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
asgiref==3.8.1
|
||||
Django==5.1.1
|
||||
djangorestframework==3.15.2
|
||||
djangorestframework-simplejwt==5.4.0
|
||||
psycopg2-binary==2.9.10
|
||||
sqlparse==0.5.1
|
||||
typing_extensions==4.12.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user