This commit is contained in:
kl3z00
2026-05-22 11:19:55 +01:00
parent 94f4f46395
commit fd53e3f4fb
113 changed files with 493 additions and 210 deletions
@@ -0,0 +1,114 @@
######## Como publicar angular work ############
npm install -> se necessário
ng serve -> se necessário
ng build -> gerar o dist
ssh teu_user@IP_DO_SERVIDOR -> comando para entrar no serviro (meter user@ip)
##Criar pasta do site no servidor eu usei um docker##
mkdir -p /docker/angular/metacaseform
### Copiar os ficheiros do PC para o servidor onde coloquei a pagina da metacase do Docker ###
scp -r dist/form_metacase/browser/* USERNAME@IP:/docker/angular/metacaseform/
#### criar o composse.yml e as configurações para o Nginx para criar o Docker ####
nano /docker/angular/metacaseform/nginx.conf
nano /docker/angular/metacaseform/docker-compose.yml
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location = /favicon.ico {
log_not_found off;
access_log off;
try_files $uri =204;
}
}
version: "3.9"
services:
angular-metacase:
image: nginx:latest
container_name: angular-metacase
restart: unless-stopped
ports:
- "8090:80"
volumes:
- /docker/angular/metacaseform/app:/usr/share/nginx/html:ro
- /docker/angular/metacaseform/nginx.conf:/etc/nginx/conf.d/default.conf:ro
##### arrancar o container #####
cd /docker/angular/metacaseform
docker compose up -d
#### IR ao Ngnix configurar o acesso http…. blabla e escolher uma porta livre no caso especifico escolhi a 8090 ####
Block Common Exploits ✓
Websockets Support ✓
Request a new certificate
Force SSL ✓
HTTP/2 Support ✓
##### Fui ao meu provaider de domínio registar o metacasehub ####
https://www.ovh.com/manager
2️⃣ Ir para a gestão do domínio
No menu da esquerda, Web Cloud → Domains
Selecionar o domínio:
Clica em DNS Zone
Criar ou editar o registo
Clica em Add an entry Escolher A CNAE:
Subdomain: metacasehub (NESTE cASO)
Target: IP_PUBLICO
TTL: Default
Exemplo:
metacasehub → 85.xxx.xxx.xxx
Saber o IP publico no meu caso eu não usei isto porque estou a usar o duck DNS mas pode ser feito por aqui:
👉 https://whatismyipaddress.com/
ou correr no terminal:
curl ifconfig.me
e deve estar
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long