Last active
December 16, 2023 16:07
-
-
Save adharshmk96/12735ea5bb02f763212d23a26bc3d8f0 to your computer and use it in GitHub Desktop.
nextjs static generation and hosting
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
FROM nginx | |
COPY out /var/www/out | |
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf | |
EXPOSE 80 | |
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
server { | |
listen 80; | |
server_name acme.com; | |
root /var/www/out; | |
location / { | |
try_files $uri $uri.html $uri/ =404; | |
} | |
error_page 404 /404.html; | |
location = /404.html { | |
internal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment