-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9abca06
commit 518d6e0
Showing
4 changed files
with
14,347 additions
and
15,872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
Oops, something went wrong.