File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,17 @@ A simple nginx container that serves Single Page Applications:
4
4
- Redirects all requests to the ` index.html ` file
5
5
- Assets compression using ` gzip ` in stylesheets and javascript files.
6
6
7
+ [ Docker Hub] ( https://hub.docker.com/r/iamfreee/docker-nginx-static-spa/ )
8
+
9
+ ## Instructions
10
+
11
+ ** Dockerfile:**
12
+ ```
13
+ FROM iamfreee/docker-nginx-static-spa:latest
14
+ COPY /dist /usr/share/nginx/html
15
+ ```
16
+
17
+ In the example above, the production build of the app is in the local ` dist ` folder and is moved to the default nginx serve path to be served.
18
+
7
19
## License
8
20
MIT
Original file line number Diff line number Diff line change 1
1
server {
2
2
listen 80; ## listen for ipv4; this line is default and implied
3
- listen [::]:80 default ipv6only=on; ## listen for ipv6
3
+ listen [::]:80 default ipv6only=on; ## listen for ipv6
4
4
5
- root /var/www/html;
6
- index index.html;
5
+ root /var/www/html;
6
+ index index.html;
7
7
8
8
server_tokens off; # disable the Server nginx header
9
9
10
- server_name _; # all hostnames
10
+ server_name _; # all hostnames
11
11
12
12
# enable gzip
13
13
gzip on;
You can’t perform that action at this time.
0 commit comments