Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
0b4075b1
Commit
0b4075b1
authored
Jun 19, 2019
by
Kenzo-Hugo Hillion
♻
Browse files
start setting up nginx
parent
1fb805c5
Pipeline
#12671
passed with stage
in 1 minute and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
docker-compose.dev.yaml
View file @
0b4075b1
...
...
@@ -14,6 +14,8 @@ services:
depends_on
:
-
db
command
:
/code/scripts/start.sh
networks
:
-
main
db
:
container_name
:
db
...
...
@@ -39,6 +41,18 @@ services:
environment
:
-
NODE_ENV=development
nginx
:
image
:
nginx:alpine
ports
:
-
"
80:80"
depends_on
:
-
backend
volumes
:
-
./nginx/dev.conf:/etc/nginx/nginx.conf:ro
networks
:
-
main
volumes
:
db-data
:
...
...
nginx/dev.conf
0 → 100644
View file @
0b4075b1
user
nginx
;
worker_processes
1
;
events
{
worker_connections
1024
;
}
http
{
include
/
etc
/
nginx
/
mime
.
types
;
client_max_body_size
100
m
;
upstream
backend
{
server
backend
:
8000
;
}
upstream
frontend
{
server
frontend
:
8080
;
}
server
{
listen
80
;
charset
utf
-
8
;
# frontend urls
location
/ {
proxy_redirect
off
;
proxy_pass
http
://
frontend
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Host
$
http_host
;
}
# frontend dev-server
location
/
sockjs
-
node
{
proxy_redirect
off
;
proxy_pass
http
://
frontend
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
remote_addr
;
proxy_set_header
Host
$
host
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
"upgrade"
;
}
# backend urls
location
~ ^/(
admin
|
api
|
static
) {
proxy_redirect
off
;
proxy_pass
http
://
backend
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Host
$
http_host
;
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment