Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit af19fbe

Browse files
committed
Server
0 parents  commit af19fbe

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3'
2+
3+
services:
4+
server:
5+
image: nginx:alpine
6+
restart: always
7+
ports:
8+
- 80:80
9+
volumes:
10+
- ./:/srv
11+
- ./nginx.conf:/etc/nginx/nginx.conf:ro

dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM nginx:alpine
2+

nginx.conf

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
user nginx;
2+
worker_processes 1;
3+
4+
error_log /var/log/nginx/error.log warn;
5+
pid /var/run/nginx.pid;
6+
7+
events {
8+
worker_connections 1024;
9+
}
10+
11+
http {
12+
include /etc/nginx/mime.types;
13+
default_type application/octet-stream;
14+
15+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
16+
'$status $body_bytes_sent "$http_referer" '
17+
'"$http_user_agent" "$http_x_forwarded_for"';
18+
19+
access_log /var/log/nginx/access.log main;
20+
21+
sendfile on;
22+
23+
keepalive_timeout 65;
24+
25+
gzip on;
26+
27+
server{
28+
listen 80;
29+
server_name _;
30+
31+
location / {
32+
root /srv;
33+
autoindex on;
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)