{"id":38814,"date":"2026-07-08T15:00:40","date_gmt":"2026-07-08T18:00:40","guid":{"rendered":"https:\/\/www.locaweb.com.br\/ajuda\/?post_type=ht_kb&#038;p=38814"},"modified":"2026-07-08T15:00:40","modified_gmt":"2026-07-08T18:00:40","slug":"como-configurar-uma-aplicacao-django-no-locaweb-cloud-com-armazenamento-de-midias-em-disco-secundario-de-dados","status":"publish","type":"ht_kb","link":"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/como-configurar-uma-aplicacao-django-no-locaweb-cloud-com-armazenamento-de-midias-em-disco-secundario-de-dados\/","title":{"rendered":"Como configurar uma aplica\u00e7\u00e3o Django no Locaweb Cloud com armazenamento de m\u00eddias em disco secund\u00e1rio de dados"},"content":{"rendered":"    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Informa\u00e7\u00e3o!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<span style=\"font-weight: 400;\">Aprenda a configurar um disco secund\u00e1rio no Locaweb Cloud para m\u00eddias do Django, garantindo performance e seguran\u00e7a via montagem persistente e Nginx.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Isolar uploads de usu\u00e1rios em um disco espec\u00edfico evita que o volume raiz sature, prevenindo indisponibilidade e facilitando backups e migra\u00e7\u00f5es em projetos Django.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A infraestrutura do <\/span><b>Locaweb Cloud<\/b><span style=\"font-weight: 400;\"> utiliza Apache CloudStack, permitindo controle total sobre volumes de dados (DATADISK) e com baixa lat\u00eancia.<\/span>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h2><b>1. Pr\u00e9-requisitos<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Para que o seu c\u00f3digo vire neg\u00f3cio de forma fluida e sem paradas t\u00e9cnicas, certifique-se de validar os seguintes requisitos:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Uma conta ativa no <\/span><a href=\"https:\/\/painel-cloud.locaweb.com.br\"><span style=\"font-weight: 400;\">painel<\/span><\/a><span style=\"font-weight: 400;\"> do Locaweb Cloud.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Uma chave privada SSH (arquivo <\/span><span style=\"font-weight: 400;\">.key<\/span><span style=\"font-weight: 400;\"> ou <\/span><span style=\"font-weight: 400;\">.pem<\/span><span style=\"font-weight: 400;\">) salva localmente com permiss\u00f5es restritas (<\/span><span style=\"font-weight: 400;\">chmod 400<\/span><span style=\"font-weight: 400;\">).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Uma m\u00e1quina virtual (VM) ativa rodando Ubuntu 22.04 LTS.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Uma aplica\u00e7\u00e3o Django estruturada com um reposit\u00f3rio Git ou arquivos locais.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Um <\/span><b>dom\u00ednio<\/b><span style=\"font-weight: 400;\"> de site registrado com apontamento do tipo <\/span><b>A<\/b><span style=\"font-weight: 400;\"> para o IP p\u00fablico da VM.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Importante!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<span style=\"font-weight: 400;\">Certifique-se de que o arquivo <\/span><span style=\"font-weight: 400;\">requirements.txt<\/span><span style=\"font-weight: 400;\"> do seu projeto Django contenha as depend\u00eancias <\/span><span style=\"font-weight: 400;\">gunicorn<\/span><span style=\"font-weight: 400;\"> e <\/span><span style=\"font-weight: 400;\">psycopg2-binary<\/span><span style=\"font-weight: 400;\"> prontas para o ambiente de produ\u00e7\u00e3o.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t<\/span><span style=\"font-weight: 400;\">Est\u00e1 com d\u00favidas sobre como come\u00e7ar no Locaweb Cloud? Acesse nosso <\/span><a href=\"https:\/\/www.locaweb.com.br\/ajuda\/wiki\/por-onde-comecar-no-locaweb-cloud\/\"><span style=\"font-weight: 400;\">tutorial de apoio<\/span><\/a><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p>\n<h2><b>2. Configura\u00e7\u00e3o da infraestrutura (painel Locaweb Cloud)<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Prepare toda a infraestrutura de rede e armazenamento diretamente no painel do Locaweb Cloud antes de abrir o terminal local. A VM s\u00f3 receber\u00e1 tr\u00e1fego externo ap\u00f3s a libera\u00e7\u00e3o das portas.<\/span><\/p>\n<h3><b>Passo 1: Criar o disco adicional<\/b><\/h3>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Acesse a Central do Cliente e entre no painel do <\/span><b>Locaweb Cloud<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No menu esquerdo, clique em <\/span><b>Armazenamento<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>Discos<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>Criar e adicionar disco<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Preencha o formul\u00e1rio com os dados da sua conta, defina um nome descritivo (ex.: <\/span><span style=\"font-weight: 400;\">disco-media-django-prod<\/span><span style=\"font-weight: 400;\">) e escolha a oferta de armazenamento em SSD para garantir alta taxa de leitura e escrita.<\/span><\/li>\n<\/ol>\n<h3><b>Passo 2: Anexar o disco \u00e0 m\u00e1quina virtual<\/b><\/h3>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Aviso!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tNossas diretrizes t\u00e9cnicas determinam que se a sua VM possuir snapshots ativos, o sistema impedir\u00e1 altera\u00e7\u00f5es de hardware. Remova todos os snapshots da VM antes de tentar anexar o novo volume.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Na listagem de <\/span><b>Discos<\/b><span style=\"font-weight: 400;\">, clique sobre o volume criado.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Na barra de ferramentas superior direita, clique no \u00edcone <\/span><b>Anexar VM<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Selecione a inst\u00e2ncia correspondente ao seu projeto Django e deixe o ID do dispositivo em branco para o sistema mapear automaticamente.<\/span><\/li>\n<\/ol>\n<h3><b>Passo 3: Liberar portas com Port Forwarding<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Navegue at\u00e9 <\/span><b>Rede<\/b><span style=\"font-weight: 400;\"> &gt; <\/span><b>IPs P\u00fablicos<\/b><span style=\"font-weight: 400;\"> (ou selecione sua VPC), clique no IP alocado e, na aba <\/span><b>Encaminhamento de porta<\/b><span style=\"font-weight: 400;\"> (<\/span><i><span style=\"font-weight: 400;\">Port Forwarding<\/span><\/i><span style=\"font-weight: 400;\">), adicione as seguintes regras:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Finalidade<\/b><\/td>\n<td><b>Porta P\u00fablica<\/b><\/td>\n<td><b>Porta Privada<\/b><\/td>\n<td><b>Protocolo<\/b><\/td>\n<td><b>VM de Destino<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">HTTP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">80<\/span><\/td>\n<td><span style=\"font-weight: 400;\">80<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VM Django<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">HTTPS<\/span><\/td>\n<td><span style=\"font-weight: 400;\">443<\/span><\/td>\n<td><span style=\"font-weight: 400;\">443<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VM Django<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Aplica\u00e7\u00e3o Gunicorn<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VM Django<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">SSH Administrativo<\/span><\/td>\n<td><span style=\"font-weight: 400;\">22<\/span><\/td>\n<td><span style=\"font-weight: 400;\">22<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">VM Django<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n    \t\t<div class=\"hts-messages hts-messages--alert  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Importante!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<span style=\"font-weight: 400;\">Nunca crie regras de redirecionamento p\u00fablico para a porta do seu <\/span><b>banco de dados<\/b><span style=\"font-weight: 400;\"> (PostgreSQL, porta 5432). O acesso ao banco deve ser estritamente local para eliminar o risco de invas\u00f5es e vazamentos.<\/span>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n<h3><b>Passo 4: Configurar as regras de Firewall<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Na mesma tela do IP p\u00fablico, acesse a aba <\/span><b>Firewall<\/b><span style=\"font-weight: 400;\"> e adicione as regras de entrada (<\/span><i><span style=\"font-weight: 400;\">inbound<\/span><\/i><span style=\"font-weight: 400;\">) para espelhar as portas liberadas:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>CIDR de Origem<\/b><\/td>\n<td><b>Porta Inicial<\/b><\/td>\n<td><b>Porta Final<\/b><\/td>\n<td><b>Protocolo<\/b><\/td>\n<td><b>Finalidade<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">0.0.0.0\/0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">80<\/span><\/td>\n<td><span style=\"font-weight: 400;\">80<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Acesso p\u00fablico HTTP<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">0.0.0.0\/0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">443<\/span><\/td>\n<td><span style=\"font-weight: 400;\">443<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Acesso p\u00fablico HTTPS<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">0.0.0.0\/0<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">8000<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Valida\u00e7\u00e3o direta do Gunicorn<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">&lt;SEU_IP_ADMIN&gt;\/32<\/span><\/td>\n<td><span style=\"font-weight: 400;\">22<\/span><\/td>\n<td><span style=\"font-weight: 400;\">22<\/span><\/td>\n<td><span style=\"font-weight: 400;\">TCP<\/span><\/td>\n<td><span style=\"font-weight: 400;\">SSH restrito \u00e0 sua rede de TI<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2><b>3. Configura\u00e7\u00e3o do sistema operacional (Terminal Linux)<\/b><\/h2>\n<h3><b>Passo 1: Identificar e formatar o novo disco<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Conecte-se \u00e0 sua inst\u00e2ncia via SSH pelo terminal local:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">ssh -i \/caminho\/sua-chave.key ubuntu@&lt;SEU_IP_PUBLICO&gt;<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Localize a designa\u00e7\u00e3o de barramento atribu\u00edda ao novo volume utilizando o comando abaixo:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Lista os dispositivos de bloco conectados \u00e0 inst\u00e2ncia<\/span>\r\n\r\n<span style=\"font-weight: 400;\">lsblk<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Identificado o disco secund\u00e1rio (ex: <\/span><span style=\"font-weight: 400;\">\/dev\/vdb<\/span><span style=\"font-weight: 400;\">), aplique a formata\u00e7\u00e3o utilizando o sistema de arquivos <\/span><b>ext4<\/b><span style=\"font-weight: 400;\">:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Cria o sistema de arquivos otimizado no disco adicional<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo mkfs.ext4 \/dev\/vdb<\/span><\/pre>\n<h3><b>Passo 2: Configurar a Montagem Persistente (fstab)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Colete o identificador universal (UUID) do novo volume para garantir a seguran\u00e7a da montagem, evitando que letras din\u00e2micas de barramento causem falhas no boot:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Exibe os dados de UUID do bloco formatado<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo blkid \/dev\/vdb<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Crie a pasta f\u00edsica que servir\u00e1 como ponto de acesso para os uploads do Django:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo mkdir -p \/mnt\/django_media<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Abra o arquivo <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"> e insira a regra de montagem permanente utilizando o UUID coletado:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Adiciona a entrada persistente com par\u00e2metros de alta performance (noatime)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">echo 'UUID=seu-uuid-aqui\u00a0 \/mnt\/django_media\u00a0 ext4\u00a0 defaults,nofail,noatime\u00a0 0\u00a0 2' | sudo tee -a \/etc\/fstab<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Mande o sistema operacional ler as novas tabelas e ajuste o propriet\u00e1rio do diret\u00f3rio para o usu\u00e1rio de execu\u00e7\u00e3o web do ecossistema:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Monta os volumes declarados e valida a pasta<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo mount -a<\/span>\r\n\r\n<span style=\"font-weight: 400;\">df -h | grep \/mnt\/django_media<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\"># Atribui a governan\u00e7a da pasta ao usu\u00e1rio www-data de forma recursiva<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo chown -R www-data:www-data \/mnt\/django_media<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo chmod -R 775 \/mnt\/django_media<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h2><b>4. Configura\u00e7\u00e3o do banco de dados: PostgreSQL<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Instale e gerencie o motor do banco de dados relacional localmente para centralizar a opera\u00e7\u00e3o e mitigar o uso de ferramentas desconexas:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo apt update &amp;&amp; sudo apt install -y postgresql postgresql-contrib<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo systemctl enable --now postgresql<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Acesse o console administrativo SQL e configure a base de dados do Django:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo -u postgres psql<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">SQL<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">-- Comandos executados dentro do shell psql<\/span>\r\n\r\n<span style=\"font-weight: 400;\">CREATE DATABASE django_app_db;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">CREATE USER django_user WITH ENCRYPTED PASSWORD '&lt;SENHA_SEGURA&gt;';<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">-- Ajustes de codifica\u00e7\u00e3o recomendados para a performance do Django<\/span>\r\n\r\n<span style=\"font-weight: 400;\">ALTER ROLE django_user SET client_encoding TO 'utf8';<\/span>\r\n\r\n<span style=\"font-weight: 400;\">ALTER ROLE django_user SET default_transaction_isolation TO 'read committed';<\/span>\r\n\r\n<span style=\"font-weight: 400;\">ALTER ROLE django_user SET timezone TO 'America\/Sao_Paulo';<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">GRANT ALL PRIVILEGES ON DATABASE django_app_db TO django_user;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\\q<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h2><b>5. Configura\u00e7\u00e3o do Django (Python)<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Edite o arquivo de parametriza\u00e7\u00e3o do seu projeto (<\/span><span style=\"font-weight: 400;\">settings.py<\/span><span style=\"font-weight: 400;\">), garantindo que o banco aponte para o endere\u00e7o local (<\/span><span style=\"font-weight: 400;\">127.0.0.1<\/span><span style=\"font-weight: 400;\">) e que a rota de m\u00eddias aponte diretamente para o ponto de montagem do disco secund\u00e1rio:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Python<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># settings.py<\/span>\r\n\r\n<span style=\"font-weight: 400;\">import os<\/span>\r\n\r\n<span style=\"font-weight: 400;\">from pathlib import Path<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">BASE_DIR = Path(__file__).resolve().parent.parent<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')<\/span>\r\n\r\n<span style=\"font-weight: 400;\">DEBUG = False<\/span>\r\n\r\n<span style=\"font-weight: 400;\">ALLOWED_HOSTS = ['meusite.com.br', 'www.meusite.com.br', '&lt;SEU_IP_PUBLICO&gt;']<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">DATABASES = {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0'default': {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'ENGINE': 'django.db.backends.postgresql',<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'NAME': 'django_app_db',<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'USER': 'django_user',<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'PASSWORD': os.environ.get('DJANGO_DB_PASSWORD'),<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'HOST': '127.0.0.1',<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0'PORT': '5432',<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\"># Configura\u00e7\u00e3o de m\u00eddias amarrada ao disco secund\u00e1rio de dados<\/span>\r\n\r\n<span style=\"font-weight: 400;\">MEDIA_URL = '\/media\/'<\/span>\r\n\r\n<span style=\"font-weight: 400;\">MEDIA_ROOT = '\/mnt\/django_media\/'<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\"># Configura\u00e7\u00e3o de est\u00e1ticos para coleta unificada do Nginx<\/span>\r\n\r\n<span style=\"font-weight: 400;\">STATIC_URL = '\/static\/'<\/span>\r\n\r\n<span style=\"font-weight: 400;\">STATIC_ROOT = '\/var\/www\/django_app\/static\/'<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Garantida a estrutura das vari\u00e1veis, execute os comandos do framework para rodar as migra\u00e7\u00f5es iniciais e reunir os componentes est\u00e1ticos:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">export DJANGO_SECRET_KEY='&lt;SUA_CHAVE_SECRETA&gt;'<\/span>\r\n\r\n<span style=\"font-weight: 400;\">export DJANGO_DB_PASSWORD='&lt;SENHA_SEGURA&gt;'<\/span>\r\n\r\n<span style=\"font-weight: 400;\">python manage.py migrate<\/span>\r\n<span style=\"font-weight: 400;\">python manage.py collectstatic --noinput<\/span><\/pre>\n<h2><b>6. Deploy da aplica\u00e7\u00e3o<\/b><\/h2>\n<h3><b>M\u00e9todo 1: Deploy manual com Gunicorn e systemd<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Crie o arquivo de unidade de servi\u00e7o do systemd para gerenciar a resili\u00eancia da aplica\u00e7\u00e3o:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo nano \/etc\/systemd\/system\/gunicorn.service<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Ini, TOML<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">[Unit]<\/span>\r\n\r\n<span style=\"font-weight: 400;\">Description=Gunicorn servindo a aplicacao Django<\/span>\r\n\r\n<span style=\"font-weight: 400;\">After=network.target<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">[Service]<\/span>\r\n\r\n<span style=\"font-weight: 400;\">User=www-data<\/span>\r\n\r\n<span style=\"font-weight: 400;\">Group=www-data<\/span>\r\n\r\n<span style=\"font-weight: 400;\">WorkingDirectory=\/var\/www\/django_app<\/span>\r\n\r\n<span style=\"font-weight: 400;\">Environment=\"DJANGO_SECRET_KEY=&lt;SUA_CHAVE_SECRETA&gt;\"<\/span>\r\n\r\n<span style=\"font-weight: 400;\">Environment=\"DJANGO_DB_PASSWORD=&lt;SENHA_SEGURA&gt;\"<\/span>\r\n\r\n<span style=\"font-weight: 400;\">ExecStart=\/var\/www\/django_app\/venv\/bin\/gunicorn --workers 3 --bind 127.0.0.1:8000 projeto.wsgi:application<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">[Install]<\/span>\r\n\r\n<span style=\"font-weight: 400;\">WantedBy=multi-user.target<\/span>\r\n\r\n\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Recarrega o daemon e inicia o servi\u00e7o em segundo plano<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo systemctl daemon-reload<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo systemctl enable --now gunicorn<\/span><\/pre>\n<h3><b>M\u00e9todo 2: Deploy moderno (Docker + GitHub Actions)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Caso utilize cont\u00eaineres para manter a imutabilidade do ambiente, execute a instala\u00e7\u00e3o do Docker e configure o arquivo <\/span><span style=\"font-weight: 400;\">docker-compose.yml<\/span><span style=\"font-weight: 400;\"> mapeando o volume f\u00edsico para dentro do container:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">YAML<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">services:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0web:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0build: .<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0restart: always<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0ports:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- \"8000:8000\"<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0volumes:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0# Mapeia o disco secund\u00e1rio para a pasta de m\u00eddias do cont\u00eainer<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- \/mnt\/django_media:\/mnt\/django_media<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0environment:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0DJANGO_DB_PASSWORD: ${DJANGO_DB_PASSWORD}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0depends_on:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- db<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0db:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0image: postgres:16-alpine<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0restart: always<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0environment:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0POSTGRES_DB: django_app_db<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0POSTGRES_USER: django_user<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0POSTGRES_PASSWORD: ${DJANGO_DB_PASSWORD}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0volumes:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- pgdata:\/var\/lib\/postgresql\/data<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">volumes:<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0pgdata:<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Ative a esteira automatizada salvando o arquivo <\/span><span style=\"font-weight: 400;\">.github\/workflows\/deploy.yml<\/span><span style=\"font-weight: 400;\"> no seu reposit\u00f3rio Git, vinculando os Secrets de conex\u00e3o SSH (<\/span><span style=\"font-weight: 400;\">SSH_HOST<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">SSH_USER<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">SSH_KEY<\/span><span style=\"font-weight: 400;\">) para rodar os comandos de <\/span><i><span style=\"font-weight: 400;\">build<\/span><\/i><span style=\"font-weight: 400;\"> e <\/span><i><span style=\"font-weight: 400;\">migrate<\/span><\/i><span style=\"font-weight: 400;\"> de forma 100% self-service a cada push.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2><b>7. Configura\u00e7\u00e3o do Servidor Web Nginx e HTTPS<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">O Nginx atuar\u00e1 na borda da infraestrutura para realizar o proxy reverso e entregar os arquivos est\u00e1ticos diretamente do disco de dados, poupando recursos da aplica\u00e7\u00e3o.<\/span><\/p>\n<h3><b>Passo 1: Configurar o bloco de servidor<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Instale os pacotes e configure o arquivo de virtualhost do Nginx:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo apt install -y nginx certbot python3-certbot-nginx<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo nano \/etc\/nginx\/sites-available\/meusite.conf<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Nginx<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">server {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0listen 80;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0server_name meusite.com.br www.meusite.com.br;<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0location \/ {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0proxy_pass http:\/\/127.0.0.1:8000;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0proxy_set_header Host $host;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0proxy_set_header X-Real-IP $remote_addr;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0proxy_set_header X-Forwarded-Proto $scheme;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0# Entrega direta de uploads a partir do disco secund\u00e1rio<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0location \/media\/ {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0alias \/mnt\/django_media\/;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0expires 30d;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0add_header Cache-Control \"public, no-transform\";<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0access_log off;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0location \/static\/ {<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0alias \/var\/www\/django_app\/static\/;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0expires 30d;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0access_log off;<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}<\/span>\r\n\r\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Ativa o site criando o link simb\u00f3lico e recarrega o servi\u00e7o<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo ln -s \/etc\/nginx\/sites-available\/meusite.conf \/etc\/nginx\/sites-enabled\/<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo nginx -t<\/span>\r\n\r\n<span style=\"font-weight: 400;\">sudo systemctl reload nginx<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h3><b>Passo 2: Ativar criptografia SSL Let&#8217;s Encrypt<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Gere as chaves de seguran\u00e7a digital e configure o redirecionamento autom\u00e1tico de tr\u00e1fego para HTTPS:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">sudo certbot --nginx -d meusite.com.br -d www.meusite.com.br<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h2><b>8. Valida\u00e7\u00e3o\u00a0<\/b><\/h2>\n<h3><b>Teste de escrita e armazenamento<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Abra o interpretador de comandos interativo do Django no servidor e valide a grava\u00e7\u00e3o de um arquivo simulado no ponto de montagem:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">python manage.py shell<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Python<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Executado dentro do shell do Django<\/span>\r\n\r\n<span style=\"font-weight: 400;\">from django.core.files.base import ContentFile<\/span>\r\n\r\n<span style=\"font-weight: 400;\">from django.core.files.storage import default_storage<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\">path = default_storage.save(<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\"testes\/test_file.txt\",<\/span>\r\n\r\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0ContentFile(b\"Validacao do disco secundario Locaweb Cloud\"),<\/span>\r\n\r\n<span style=\"font-weight: 400;\">)<\/span>\r\n\r\n<span style=\"font-weight: 400;\">print(f\"Arquivo salvo com sucesso em: {path}\")<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Saia do shell e verifique diretamente no terminal do Linux se os dados foram gravados de forma f\u00edsica no volume secund\u00e1rio alocado:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">cat \/mnt\/django_media\/testes\/test_file.txt<\/span><\/pre>\n<h3><b>Teste externo e seguran\u00e7a<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Do prompt de comando da sua m\u00e1quina local, fa\u00e7a requisi\u00e7\u00f5es externas para verificar a resposta correta via HTTPS e o bloqueio da porta de dados (5432):<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Bash<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># Deve retornar o status HTTP 200 OK vindo do Nginx<\/span>\r\n\r\n<span style=\"font-weight: 400;\">curl -I https:\/\/meusite.com.br\/media\/testes\/test_file.txt<\/span>\r\n\r\n\r\n\r\n\r\n<span style=\"font-weight: 400;\"># Deve falhar por timeout, provando que o banco de dados est\u00e1 isolado<\/span>\r\n\r\n<span style=\"font-weight: 400;\">nc -zv &lt;SEU_IP_PUBLICO&gt; 5432<\/span><\/pre>\n<p>&nbsp;<\/p>\n<h2><b>9. Solu\u00e7\u00e3o de problemas (Troubleshooting)<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Erro 502 Bad Gateway ao carregar o site:<\/b><span style=\"font-weight: 400;\"> Indica que o Nginx est\u00e1 operacional, mas o servi\u00e7o do Gunicorn est\u00e1 inativo localmente. Verifique as falhas e sa\u00eddas executando <\/span><span style=\"font-weight: 400;\">sudo journalctl -u gunicorn -n 50 &#8211;no-pager<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Os uploads desaparecem ap\u00f3s reiniciar a VM:<\/b><span style=\"font-weight: 400;\"> A entrada no arquivo <\/span><span style=\"font-weight: 400;\">\/etc\/fstab<\/span><span style=\"font-weight: 400;\"> pode estar incorreta. Execute <\/span><span style=\"font-weight: 400;\">sudo blkid \/dev\/vdb<\/span><span style=\"font-weight: 400;\"> para confirmar se o UUID bate exatamente com a linha inserida e use <\/span><span style=\"font-weight: 400;\">sudo mount -a<\/span><span style=\"font-weight: 400;\"> para restabelecer os pontos de montagem.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Quedas por timeout ou lentid\u00e3o em requisi\u00e7\u00f5es de m\u00eddia:<\/b><span style=\"font-weight: 400;\"> Garanta que a governan\u00e7a recursiva do diret\u00f3rio <\/span><span style=\"font-weight: 400;\">\/mnt\/django_media<\/span><span style=\"font-weight: 400;\"> esteja amarrada ao usu\u00e1rio web executando <\/span><span style=\"font-weight: 400;\">sudo chown -R www-data:www-data \/mnt\/django_media<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n    \t\t<div class=\"hts-messages hts-messages--success  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Pronto!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\tO deploy da sua aplica\u00e7\u00e3o Django e a infraestrutura do disco secund\u00e1rio foram conclu\u00eddos com sucesso. Toda a sua opera\u00e7\u00e3o est\u00e1 unificada, segura e rodando sem gargalos de armazenamento.    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n    \t\t<div class=\"hts-messages hts-messages--info  hts-messages--withtitle hts-messages--withicon \"   >\r\n    \t\t\t<span class=\"hts-messages__title\">Conhe\u00e7a!<\/span>    \t\t\t    \t\t\t\t<p>\r\n    \t\t\t\t\t<span style=\"font-weight: 400;\">Quer automatizar disparos de confirma\u00e7\u00e3o de cadastro, relat\u00f3rios de uploads ou faturas transacionais diretamente do seu app Django? Conhe\u00e7a o <\/span><a href=\"https:\/\/www.locaweb.com.br\/smtp-locaweb\/\"><b>SMTP Locaweb<\/b><\/a><span style=\"font-weight: 400;\">, nossa plataforma de alta reputa\u00e7\u00e3o e entregabilidade de mensagens desenvolvida para fazer o seu sistema se comunicar com velocidade e seguran\u00e7a!<\/span>    \t\t\t\t<\/p>\r\n    \t\t\t    \t\t\t\r\n    \t\t<\/div><!-- \/.ht-shortcodes-messages -->\r\n    \t\t\n","protected":false},"excerpt":{"rendered":"<p>1. Pr\u00e9-requisitos Para que o seu c\u00f3digo vire neg\u00f3cio de forma fluida e sem paradas t\u00e9cnicas, certifique-se de validar os seguintes requisitos: Uma conta ativa no painel do Locaweb Cloud. Uma chave privada SSH (arquivo .key ou .pem) salva localmente com permiss\u00f5es restritas (chmod 400). Uma m\u00e1quina virtual (VM) ativa&#8230;<\/p>\n","protected":false},"author":29,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[666],"ht-kb-tag":[],"class_list":["post-38814","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-locaweb-cloud"],"_links":{"self":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/38814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/comments?post=38814"}],"version-history":[{"count":1,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/38814\/revisions"}],"predecessor-version":[{"id":38815,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb\/38814\/revisions\/38815"}],"wp:attachment":[{"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/media?parent=38814"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb-category?post=38814"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.locaweb.com.br\/ajuda\/wp-json\/wp\/v2\/ht-kb-tag?post=38814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}