Commit 01a255db authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added compose and deployment for rawapi.

parent aac7de63
Pipeline #40530 canceled with stages
in 6 minutes and 10 seconds
......@@ -186,3 +186,15 @@ deploy:
except:
- /^dev-.*$/
when: manual
releaserawapi:
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
- cd ops/docker-compose/rawapi
# secret .env file is stored on the "production" machine and is bind mounted into the
# runner container at /nomad/config/.env
- cp /nomad/config/.rawapi_env .env
- docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
except:
- /^dev-.*$/
when: manual
Contains all files to run the rawapi with docker-compose on a single docker, both
for development and production.
We use docker-compose overrides to modify config for development and production. Example:
```
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
```
The different overrides are:
- *.prod.yml, production (currently on enc-preprocessing-nomad.esc)
You have to create a .env file with the variable `RAW_FILE_DIR` to determine the
directory with the rawfiles: `<RAW_FILE_DIR>/data/R*.zip` .
\ No newline at end of file
# Copyright 2018 Markus Scheidgen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an"AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.4'
services:
# nomad rawapi
api:
restart: always
image: gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair/rawapi:latest
# Copyright 2018 Markus Scheidgen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an"AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.4'
services:
# nomad rawapi
api:
image: nomad/rawapi
container_name: nomad_rawapi
environment:
NOMAD_API_BASE_PATH: /nomad/rawapi
NOMAD_SERVICE: rawapi
volumes:
- ${RAW_FILE_DIR}:/raw
ports:
- 8001:8000
......@@ -48,7 +48,7 @@ GET http://localhost:8000/nomad/api/admin/repair_uploads HTTP/1.1
###
GET http://localhost:8000/nomad/api/raw/test/some HTTP/1.1
GET http://localhost:8001/nomad/rawapi/raw/WUTlEULVrv6jEgFvSaOX1j0pF7on/examples_vasp/xml/Si.xml HTTP/1.1
Accept: application/json
###
......
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