git clone https://github.com/nc2U/rebs
cd rebs
cd deploy
cp docker-compose.yml.tmpl docker-compose.yml
Check what must be defined in docker-compose.yml file.
Enter the actual data for your environment as described in the following items.
To develop in local mode set docker-compose.yml -> web -> DJANGO_SETTINGS_MODULE: app.settings.local
To develop in production mode, create a prod.py file with the following command:
cd app/django/app/settings
cp local.py prod.py
In production mode, configure the prod.py file according to your needs. If not modified, it is the same as local mode.
docker-compose up -d --build
docker-compose exec web python manage.py makemigrations
docker-compose exec web python manage.py migrate
docker-compose exec web python manage.py collectstatic
※ Place your Django project in the django directory and develop it.
cd ..
cd app/vue3
pnpm i # npm i (or) yarn
Vue application development -> node dev server on.
pnpm dev # npm run dev (or) yarn dev
or Vue application deploy -> node build
pnpm build # npm run build (or) yarn build
cd ..
cd app/svelte
pnpm i # npm i (or) yarn
Svelte application development -> node dev server on.
pnpm dev # npm run dev (or) yarn dev
or Svelte application deploy -> node build
pnpm build # npm run build (or) yarn build
Configure a Kubernetes cluster by setting up the required number of nodes.
The ci/cd server uses the master node of the Kubernetes cluster or a separate server or PC.
If you use the master node in the cluster as a ci/cd server, set up external access through ssh and install helm on the master node.
If you are using a server or PC outside the cluster, configure it to connect via ssh from outside, install helm, and then copy and configure the kubeconfig file to the user's home directory to access and control the master node.
Check the IP or domain that can access the ci/cd server.
For the nfs storage server, it is recommended to prepare a separate server if a large amount of data will be used in the future, but you can also use the cluster's master node or ci/cd server.
Install the necessary packages according to the operating system on the server to be used as a storage server, run it as an NFS server, and connect it to the Kubernetes cluster nodes.
Also, enable connection via ssh and check the accessible IP or domain.
Secure the domain to be used for this project and connect each cluster node to the domain.
Use an existing GitHub account or create a new one and fork this project.
Afterward, go to the Settings > Secrets and variables > Actions menu and click the 'New repository secret' button to create Repository secrets with the keys and values below.
Go to the action tab in the GitHub repository.
Click 'Show more workflows...' at the bottom of all workflows, click _initial [Prod Step1]
, and then use the
Kubernetes watch
command on the cicd server to check whether the relevant PODs are created and operating normally.
When all database pods operate normally,
Click _initial [Prod Step2]
at the bottom of all workflows in the action tab.