feat: deploy files
This commit is contained in:
parent
e00fba297d
commit
a4c1c06826
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
||||
*
|
||||
!/build
|
||||
!/certs
|
||||
!*.pem
|
||||
!*.conf
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -21,3 +21,6 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
*.pem
|
||||
|
||||
|
5
DeployImage
Normal file
5
DeployImage
Normal file
@ -0,0 +1,5 @@
|
||||
FROM nginx:latest
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY build/ /usr/share/nginx/html
|
||||
COPY hub.conf /etc/nginx/conf.d/default.conf
|
11
Makefile
Normal file
11
Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
build-hub:
|
||||
yarn run build
|
||||
docker context use phub
|
||||
docker build -f ./DeployImage -t hub_front .
|
||||
docker compose up --force-recreate --no-deps -d hub
|
||||
build-templategen:
|
||||
docker compose up --force-recreate --no-deps -d docs
|
||||
build-proxy:
|
||||
docker build -f ./Proxy -t nginx-proxy .
|
||||
deploy:
|
||||
docker compose up -d
|
5
Proxy
Normal file
5
Proxy
Normal file
@ -0,0 +1,5 @@
|
||||
FROM nginx:latest
|
||||
|
||||
COPY privkey.pem /etc/nginx/
|
||||
COPY fullchain.pem /etc/nginx/
|
||||
COPY default.conf /etc/nginx/conf.d/
|
34
compose.yml
Normal file
34
compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
services:
|
||||
router:
|
||||
image: nginx-proxy
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
expose:
|
||||
- 80
|
||||
- 443
|
||||
networks:
|
||||
- penahub_frontend
|
||||
- default
|
||||
depends_on:
|
||||
- hub
|
||||
- docs
|
||||
hub:
|
||||
image: hub_front
|
||||
networks:
|
||||
- penahub_frontend
|
||||
hostname: hub
|
||||
restart: always
|
||||
container_name: hub_front
|
||||
docs:
|
||||
image: tmplategen_front
|
||||
networks:
|
||||
- penahub_frontend
|
||||
hostname: docs
|
||||
restart: always
|
||||
container_name: tmplategen_front
|
||||
networks:
|
||||
penahub_frontend:
|
||||
driver: bridge
|
||||
attachable: true
|
||||
internal: true
|
27
default.conf
Normal file
27
default.conf
Normal file
@ -0,0 +1,27 @@
|
||||
server {
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
index index.html index.htm index.nginx-debian.html;
|
||||
server_name _; # managed by Certbot
|
||||
|
||||
location / {
|
||||
if ($host = hub.pena.digital) {
|
||||
proxy_pass http://hub;
|
||||
}
|
||||
if ($host = docs.pena.digital) {
|
||||
proxy_pass http://docs;
|
||||
}
|
||||
}
|
||||
|
||||
listen [::]:443 ssl ipv6only=on; # managed by Certbot
|
||||
listen 443 ssl; # managed by Certbot
|
||||
ssl_certificate /etc/nginx/fullchain.pem; # managed by Certbot
|
||||
ssl_certificate_key /etc/nginx/privkey.pem; # managed by Certbot
|
||||
|
||||
}
|
||||
server {
|
||||
listen 80 ;
|
||||
listen [::]:80 ;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
12
hub.conf
Normal file
12
hub.conf
Normal file
@ -0,0 +1,12 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
}
|
26465
package-lock.json
generated
Normal file
26465
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -39,6 +39,9 @@ export default function AccordionWrapper({ content }: Props) {
|
||||
opacity: 1,
|
||||
}
|
||||
}}
|
||||
TransitionProps={{
|
||||
timeout: 0
|
||||
}}
|
||||
>
|
||||
<AccordionSummary
|
||||
expandIcon={<ExpandIcon />}
|
||||
@ -86,4 +89,4 @@ export default function AccordionWrapper({ content }: Props) {
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user