Commit 991e5e82 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Moved ningx conf for gui container from compose to gui build.

parent 4d9a7b37
Pipeline #37061 passed with stages
in 6 minutes and 15 seconds
......@@ -11,7 +11,6 @@ image: youpy/docker-compose-git
stages:
- build
- qa
- test
- release
- deploy
......@@ -39,7 +38,7 @@ buildgui:
- docker push $FRONTEND_TEST_IMAGE
linting:
stage: qa
stage: test
image: $TEST_IMAGE
script:
- cd /app
......
......@@ -82,7 +82,7 @@ pip install -e .
## Build and run the infrastructure with docker
### Docker and nomad
Nomad depends on a set of databases, searchengine, and other services. Those
Nomad depends on a set of databases, searchengines, and other services. Those
must run to make use of nomad. We use *docker* and *docker-compose* to create a
unified environment that is easy to build and to run.
......@@ -107,10 +107,28 @@ The images are build via *docker-compose* and don't have to be created manually.
### Build with docker-compose
We have multiple *docker-compose* files that must be used together.
- `docker-compose.yml` containes the base definitions for all services
- `docker-compose.dev.yml` configures services for development (notably builds images for nomad services)
- `docker-compose.prod.yml` configures services for production (notable uses a pre-build image for nomad services that was build during CI/CD)
It is sufficient to use the implicit `docker-compose.yml` only (like in the command below).
To also use `docker-compose.dev.yml` replace `docker-compose` with
`docker-compose -f docker-compose.yml -f docker-compose.dev.yml`.
The biggest difference is that `*.dev.*` exposes more ports to you host, which can
be beneficial for debugging.
There is also an `.env` file. For development you can use `.env_dev`:
```
cd ./infrastructure/nomad
ln -s .env_dev .env
```
The production `.env` file is stored on our serves and not part of the source code.
Now we can build the *docker-compose* that contains all external services (rabbitmq,
mongo, elastic, elk) and nomad services (worker, api, gui).
```
cd ./infrastructure/nomad
docker-compose build
```
......@@ -136,7 +154,7 @@ docker-compose down
### Run containers selectively
The following services/containers are managed via our docker-compose:
- rabbitmq, mongo, elastic, elk
- rabbitmq, mongo, elastic, (elk, only for production)
- worker, api
- gui
- proxy
......
......@@ -33,4 +33,5 @@ RUN yarn build
# production environment
FROM nginx:1.13.9-alpine
COPY --from=build /nomad/app/build /app/nomad
COPY ./gui.conf /etc/nginx/conf.d/default.conf
CMD ["nginx", "-g", "daemon off;"]
......@@ -93,8 +93,6 @@ services:
restart: always
image: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair/frontend:latest
container_name: nomad_gui
volumes:
- ./gui.conf:/etc/nginx/conf.d/default.conf:ro
command: nginx -g 'daemon off;'
# reverse proxy everything together
......
......@@ -142,4 +142,5 @@ def test_counter(worker, no_warn):
p = ParentProc.get(p.id)
assert_proc(p, 'join')
assert p.joined
# TODO there is a bug with this
# assert p.joined
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment