Skip to content

Commit

Permalink
Sync changes from standalone repo
Browse files Browse the repository at this point in the history
  • Loading branch information
shashank-priyadarshi committed Feb 18, 2024
1 parent 9abca06 commit 518d6e0
Show file tree
Hide file tree
Showing 4 changed files with 14,347 additions and 15,872 deletions.
12 changes: 10 additions & 2 deletions portfolio/portfolio-core-ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#stage 1
FROM node:latest as node
WORKDIR /app
COPY . .
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npx nx reset
RUN npm run build --prod

#stage 2
FROM nginx:alpine
COPY --from=node /app/dist/portfolio /usr/share/nginx/html
COPY --from=node /app/dist/ssnk.in /usr/share/nginx/html

EXPOSE 80
EXPOSE 443

CMD ["nginx", "-g", "daemon off;"]
15 changes: 15 additions & 0 deletions portfolio/portfolio-core-ui/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.8'

services:
portfolio:
container_name: portfolio
image: nathukaka/portfolio:v0.0.1
# build: .
ports:
- "8080:80"
- "8443:443"
volumes:
- ./certificates:/certs
- ./nginx.conf:/etc/nginx/nginx.conf
environment:
- NGINX_HOST=ssnk.in
41 changes: 41 additions & 0 deletions portfolio/portfolio-core-ui/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
events {
# Define the number of worker processes
worker_connections 1024;
}

http {
server {
listen 80;
server_name $$NGINX_HOST;

location / {
return 301 https://$host$request_uri;
}
}

server {
listen 443 ssl;
server_name $$NGINX_HOST;

ssl_certificate /certs/cert.pem;
ssl_certificate_key /certs/key.pem;

# Other SSL configurations can be added here
# ssl_protocols TLSv1.2 TLSv1.3;
# ssl_ciphers 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256';
# ssl_session_cache shared:SSL:10m;
# ssl_session_timeout 10m;
# ssl_session_tickets on;
# ssl_session_ticket_key /etc/nginx/ssl_session_ticket.key;
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
# ssl_stapling on;
# ssl_stapling_verify on;
# resolver 8.8.8.8 8.8.4.4 valid=300s;
# resolver_timeout 5s;

location / {
root /usr/share/nginx/html/ssnk.in/browser;
index index.html index.htm;
}
}
}
Loading

0 comments on commit 518d6e0

Please sign in to comment.