Import spectra from Fritz #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
docker_build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install "wheel>=0.36.0" | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/pip | |
key: ${{ runner.os }}-${{ hashFiles('**/requirements*.txt') }} | |
- name: create secrets.json | |
run: | | |
touch secrets.json | |
cat >> secrets.json << EOL | |
{ | |
"server" : { | |
"admin_username": "ADMIN", | |
"admin_password": "PASSWORD" | |
}, | |
"database": { | |
"admin": "mongoadmin", | |
"admin_pwd": "mongoadminsecret", | |
"user": "user", | |
"pwd": "pwd" | |
}, | |
"kowalski": { | |
"instances": { | |
"gloria": { | |
"protocol": "https", | |
"host": "gloria.caltech.edu", | |
"port": 443, | |
"token": null | |
}, | |
"melman": { | |
"protocol": "https", | |
"host": "melman.caltech.edu", | |
"port": 443, | |
"token": null | |
}, | |
"kowalski": { | |
"protocol": "https", | |
"host": "kowalski.caltech.edu", | |
"port": 443, | |
"token": null | |
} | |
} | |
} | |
} | |
EOL | |
- name: Build image | |
run: | | |
docker volume create ztf_variable_marshal_mongodb | |
docker volume create ztf_variable_marshal_data | |
docker run -d --restart always --name ztf_variable_marshal_mongo_1 -p 27025:27017 \ | |
-v ztf_variable_marshal_mongodb:/data/db \ | |
-e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=mongoadminsecret \ | |
mongo:latest | |
docker build --rm -t ztf_variable_marshal:latest -f Dockerfile . |