Initial
This commit is contained in:
parent
fa34d894b5
commit
6026829ca0
5 changed files with 97 additions and 14 deletions
80
README.md
80
README.md
|
|
@ -1,2 +1,80 @@
|
|||
# django_centos_deploy
|
||||

|
||||
# Django to CentOS
|
||||
|
||||
[](https://git.lucasf.dev/publico/django-to-centos/-/blob/main/LICENSE)
|
||||
|
||||
|
||||
Centos to Django is a bash script for deploy your django applications on CentOS servers.
|
||||
|
||||
## How to use
|
||||
|
||||
1. Clone this project into your server:
|
||||
|
||||
```shell
|
||||
https://git.lucasf.dev/public/django-to-centos.git
|
||||
```
|
||||
|
||||
2. Fill in the variables from centos.conf file.
|
||||
|
||||
```bash
|
||||
# ATENÇÃO, NÃO DEVE HAVER SEPARAÇÃO ENTRE O NOME DA VARIÁVEL E O VALOR DA VARIÁVEL APÓS O SINAL DE IGUALDADE
|
||||
# ATTENTION, NO SPACES BETWEEN VAR NAME AND VAR CONTENT
|
||||
|
||||
# Nome do usuário no sistema
|
||||
# Sistem's username
|
||||
USERNAME="centos"
|
||||
|
||||
# Nome do App no repositório
|
||||
# Application name in repository
|
||||
APP="app"
|
||||
|
||||
# Nome do ambiente virtual python
|
||||
# Virtual environment name
|
||||
VENV=".venv"
|
||||
|
||||
# Nome de usuário do repositório ou grupo
|
||||
# Git username or group
|
||||
GIT_USER="username"
|
||||
|
||||
# Endereço do projeto no repositório
|
||||
# Git project url
|
||||
GITURL="https://repo.com/$GIT_USER/$APP.git"
|
||||
|
||||
# IP público ou domínio. Se deixar em branco o script vai capturar o endereço de IP com o comando hostname
|
||||
# Public IP address or domain. If you leave it blank, the script'll catch the IP address with hostname command
|
||||
PUB_IP=""
|
||||
|
||||
# Nome da pasta que está no mesmo nível do arquivo wsgi.py
|
||||
# Folder name that is at the same level as wsgi.py file
|
||||
WSGI_FOLDER_NAME="appdirname"
|
||||
|
||||
# Nome desejado para o serviço no Systemctl
|
||||
# Systemctl desirable name
|
||||
SERVICE="app.service"
|
||||
|
||||
# Descrição do serviço no Systemctl
|
||||
# Systemctl service description
|
||||
DESCRIPTION="Django VPS uWSGI Emperor"
|
||||
|
||||
# Adicionar o certificado digital na aplicação com Certbot. Escreva sim, se já possuir um domínio na internet
|
||||
# Apply certbot ssl certificate, hit yes if you already have a domain
|
||||
CERTBOT="no"
|
||||
|
||||
# Adicionar renovação do certbot no crontab. Escreva sim, apenas se já possuir um domínio na internet
|
||||
# Create a renew certbot cron job, hit yes if you already have a domain
|
||||
CRON_CERTBOT="no"
|
||||
|
||||
# Incrementar IP em ALLOWED_HOSTS no arquivo .env caso não tenha incrementado
|
||||
# Increase ALLOWED_HOSTS IP on .env file
|
||||
IP_INCRE="yes"
|
||||
|
||||
# Mensagens em Português Brasil
|
||||
# PT_BR messages
|
||||
PTBR="no"
|
||||
```
|
||||
|
||||
3. Execute script:
|
||||
|
||||
```shell
|
||||
sh run.sh
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue