Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EUbOPEN Web
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChEMBL
EUbOPEN
EUbOPEN Web
Commits
ab19eae0
Commit
ab19eae0
authored
4 years ago
by
David Mendez
Browse files
Options
Downloads
Patches
Plain Diff
CI: Add building step and dockerfile
parent
cba84539
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Add deployment to staging
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+42
-0
42 additions, 0 deletions
.gitlab-ci.yml
Dockerfile
+23
-0
23 additions, 0 deletions
Dockerfile
with
65 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
42
−
0
View file @
ab19eae0
variables
:
DOCKER_TLS_CERTDIR
:
"
"
GIT_STRATEGY
:
clone
REGISTRY_USER
:
chembl/eubopen
APPLICATION
:
eubopen-web
SERVER_IMAGE_TAG
:
${CI_REGISTRY}/${REGISTRY_USER}/${APPLICATION}:${CI_COMMIT_SHORT_SHA}
DOCKER_DRIVER
:
overlay
CONFIGS_FOLDER
:
run_config
# Config staging
ENV_STAGING_FILE_PATH
:
${CONFIGS_FOLDER}/staging/.env
# INGRESS_STAGING_FILE_PATH: ${CONFIGS_FOLDER}/staging/ingress.yml
# Config prod hx
ENV_PROD_HX_FILE_PATH
:
${CONFIGS_FOLDER}/prod_hx/.env
# Config prod hx
ENV_PROD_HH_FILE_PATH
:
${CONFIGS_FOLDER}/prod_hh/.env
stages
:
-
build
# ----------------------------------------------------------------------------------------------------------------------
# build
# ----------------------------------------------------------------------------------------------------------------------
build
:
image
:
name
:
docker:latest
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
stage
:
build
variables
:
DOCKER_HOST
:
tcp://docker:2375
services
:
-
docker:dind
tags
:
-
dind
script
:
-
set -x
-
echo 'building!'
-
docker version
# verify docker cli is there. Also prints server info
-
echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
-
echo building ${SERVER_IMAGE_TAG}
-
docker build --tag ${SERVER_IMAGE_TAG} .
-
docker push ${SERVER_IMAGE_TAG}
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
23
−
0
View file @
ab19eae0
FROM
node:lts
ENV
ENV_FILE_PATH=${ENV_FILE_PATH:-'/etc/run_config/.env'}
LABEL
maintainer="dmendez@ebi.ac.uk"
ENV
APP_SOURCE /usr/src/eubopen-web
RUN
mkdir
-p
${
APP_SOURCE
}
WORKDIR
${APP_SOURCE}
RUN
apt-get update
-qq
-y
&&
\
apt-get upgrade
-qq
-y
&&
\
apt-get
install
-qq
-y
git
COPY
. ${APP_SOURCE}
RUN
npm
install
ENV
HOST 0.0.0.0
EXPOSE
3000
ENTRYPOINT
ENV_FILE_PATH=${ENV_FILE_PATH} npm run build && npm start
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment