Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
metagenedb
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Metagenomics
metagenedb
Commits
0cddff3b
Commit
0cddff3b
authored
5 years ago
by
Kenzo-Hugo Hillion
♻️
Browse files
Options
Downloads
Patches
Plain Diff
update docker compose to work with 4 services
parent
0b4075b1
No related branches found
No related tags found
1 merge request
!1
Front vue
Pipeline
#12676
passed
5 years ago
Stage: lint_test_coverage_backend
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docker-compose.dev.yaml
+11
-3
11 additions, 3 deletions
docker-compose.dev.yaml
nginx/dev/Dockerfile
+5
-0
5 additions, 0 deletions
nginx/dev/Dockerfile
nginx/dev/dev.conf
+58
-0
58 additions, 0 deletions
nginx/dev/dev.conf
with
74 additions
and
3 deletions
docker-compose.dev.yaml
+
11
−
3
View file @
0cddff3b
...
@@ -3,9 +3,11 @@ version: '3.7'
...
@@ -3,9 +3,11 @@ version: '3.7'
services
:
services
:
backend
:
backend
:
container_name
:
backend
container_name
:
backend
build
:
./backend
build
:
context
:
./backend
volumes
:
volumes
:
-
./backend:/code
-
./backend:/code
-
django-static:/backend/public/static
ports
:
ports
:
-
"
8000:8000"
-
"
8000:8000"
env_file
:
.env
env_file
:
.env
...
@@ -24,6 +26,8 @@ services:
...
@@ -24,6 +26,8 @@ services:
-
"
5433:5432"
-
"
5433:5432"
volumes
:
volumes
:
-
db-data:/var/lib/postgresql/data
-
db-data:/var/lib/postgresql/data
networks
:
-
main
frontend
:
frontend
:
build
:
build
:
...
@@ -42,19 +46,23 @@ services:
...
@@ -42,19 +46,23 @@ services:
-
NODE_ENV=development
-
NODE_ENV=development
nginx
:
nginx
:
image
:
nginx:alpine
build
:
context
:
.
dockerfile
:
nginx/dev/Dockerfile
ports
:
ports
:
-
"
80:80"
-
"
80:80"
depends_on
:
depends_on
:
-
backend
-
backend
volumes
:
volumes
:
-
./nginx/dev.conf:/etc/nginx/nginx.conf:ro
-
./nginx/dev/dev.conf:/etc/nginx/nginx.conf:ro
-
django-static:/usr/src/app/static
networks
:
networks
:
-
main
-
main
volumes
:
volumes
:
db-data
:
db-data
:
django-static
:
networks
:
networks
:
main
:
main
:
...
...
This diff is collapsed.
Click to expand it.
nginx/dev/Dockerfile
0 → 100644
+
5
−
0
View file @
0cddff3b
FROM
nginx:1.13.12-alpine
COPY
nginx/dev/dev.conf /etc/nginx/nginx.conf
COPY
backend/public/static /usr/src/app/static/
EXPOSE
80
CMD
["nginx", "-g", "daemon off;"]
This diff is collapsed.
Click to expand it.
nginx/dev/dev.conf
0 → 100644
+
58
−
0
View file @
0cddff3b
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
|
catalog
|
auth
) {
proxy_redirect
off
;
proxy_pass
http
://
backend
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Host
$
http_host
;
}
# static files
location
/
static
{
autoindex
on
;
alias
/
usr
/
src
/
app
/
static
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment