Commit 3f59b885 authored by Lucas Fernandes de Oliveira's avatar Lucas Fernandes de Oliveira

Merge branch 'issue/53' into 'master'

Issue #53: Add docker-compose.yml with read-only setup

See merge request !50
parents dcd80665 f6cbbb79
Pipeline #13904 failed with stages
in 57 seconds
......@@ -10,3 +10,5 @@ nodemon.json
*.swp
*.log
*.swo
*.env
......@@ -7,15 +7,22 @@ variables:
POSTGRES_DB: 'blendb_fixture'
POSTGRES_USER: 'runner'
POSTGRES_PASSWORD: ''
PKG_VERSION: 'latest'
cache:
paths:
- node_modules
before_script:
- npm install --silent
stages:
- test
- build
- deploy
run_tests:
stage: test
before_script:
- npm install --silent
script:
- mv config/ci_test.yaml.example config/test.yaml
- mv config/ci_test.env.example config/test.env
......@@ -24,3 +31,28 @@ run_tests:
tags:
- node
- postgres
build:
stage: build
variables:
PKG_VERSION: 'latest'
script:
- PKG_VERSION=$(cat package.json | grep \"version\" | cut -f2 -d':'| sed -e 's/"\|,//g' | tr -d ' ')
- echo ${PKG_VERSION}
- docker build -t marula.c3sl.ufpr.br:5000/c3sl/blendb:${PKG_VERSION} .
tags:
- docker
- build
deploy:
stage: deploy
variables:
PKG_VERSION: 'latest'
script:
- PKG_VERSION=$(cat package.json | grep \"version\" | cut -f2 -d':'| sed -e 's/"\|,//g' | tr -d ' ')
- docker push marula.c3sl.ufpr.br:5000/c3sl/blendb:${PKG_VERSION} .
tags:
- docker
- build
only:
- master
version: '3.3'
services:
blendb:
image: marula.c3sl.ufpr.br:5000/c3sl/blendb:latest
build: /home/lfo14/c3sl/blendb
container_name: blendb
# depends_on:
# - db
environment:
BLENDB_DB_USER: ${BLENDB_DB_USER}
BLENDB_DB_PASSWORD: ${BLENDB_DB_PASSWORD}
BLENDB_DB_NAME: ${BLENDB_DB_NAME}
BLENDB_DB_HOST: ${BLENDB_DB_HOST}
BLENDB_DB_PORT: ${BLENDB_DB_PORT}
BLENDB_ST_CREATE: ${BLENDB_ST_CREATE}
BLENDB_ST_INSERT: ${BLENDB_ST_INSERT}
BLENDB_ADAPTER: ${BLENDB_ADAPTER}
volumes:
-
type: bind
source: ./config
target: /home/node/app/config
-
type: tmpfs
target: /tmp
restart: unless-stopped
read_only: 'true'
security_opt:
- no-new-privileges
# db:
# image: postgres:9.6
# container_name: db
# ports:
# - "5432"
# restart: unless-stopped
# #read_only: 'true'
# security_opt:
# - no-new-privileges
Markdown is supported
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