Skip to content
Snippets Groups Projects
Commit 2ba50864 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

added initial docker setup for running NGAS locally

parent 260a8321
No related branches found
No related tags found
1 merge request!347added initial docker setup for running NGAS locally
Pipeline #2252 passed with warnings
......@@ -79,3 +79,9 @@ services/**/**/testing
tmp
delivery_root
lustre/
# ignore local NGAS
local_ngas_root/cache/
local_ngas_root/log/
local_ngas_root/processing/
local_ngas_root/*.pid
FROM icrar/ngas:11.0.2
# Get postgres/mysql development stuff in the image
RUN yum -y install epel-release && \
yum install -y postgresql-libs
USER ngas
RUN ./home/ngas/ngas_rt/bin/pip install psycopg2-binary==2.7.7
USER root
FROM postgres:12.6-alpine
COPY ./ci/psql/test_data_archive.sql.gz /docker-entrypoint-initdb.d/test_data_archive.sql.gz
ARG NGAS_VERSION=11.0.2
WORKDIR /repos
RUN apk add git && \
git clone --depth 1 --branch "v${NGAS_VERSION}" https://github.com/ICRAR/ngas.git
WORKDIR /
COPY ./ci/psql/init_ngas_db.sh ./ci/psql/test_data_archive.sql.gz /docker-entrypoint-initdb.d/
CMD ["postgres"]
\ No newline at end of file
#!/bin/bash
set -e
set -o pipefail
DB=ngas
PATH_TO_SQL_FILE=/repos/ngas/src/ngamsCore/ngamsSql/ngamsCreateTables-PostgreSQL.sql
echo "Creating database '$DB' "
createdb -U $POSTGRES_USER -O $POSTGRES_USER $DB
echo "Populating database '$DB' "
psql -U $POSTGRES_USER -1 -d $DB -f $PATH_TO_SQL_FILE
echo "'$DB' was created and populated successfully"
......@@ -43,6 +43,17 @@ services:
- ./delivery_root:/tmp/delivery_root
- ./lustre/aoc/cluster/pipeline/docker/workspaces:/lustre/aoc/cluster/pipeline/docker/workspaces
ngas:
build:
context: .
dockerfile: ./Dockerfile.ngas
depends_on:
- db
ports:
- "7777:7777"
volumes:
- ./local_ngas_root:/home/ngas/NGAS
schema:
build:
context: ./schema/
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment