mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #22 from Human-Connection/travis-ci-build
Travis ci build
This commit is contained in:
commit
3760ffad59
31
.travis.yml
Normal file
31
.travis.yml
Normal file
@ -0,0 +1,31 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "10"
|
||||
services:
|
||||
- docker
|
||||
cache:
|
||||
yarn: true
|
||||
directories:
|
||||
- node_modules
|
||||
|
||||
install:
|
||||
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-backend .
|
||||
|
||||
script:
|
||||
# TODO: re-add when testing is setup properly
|
||||
# - docker run humanconnection/nitro-backend yarn run db:seed
|
||||
|
||||
after_success:
|
||||
# - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
||||
# - chmod +x send.sh
|
||||
# - ./send.sh success $WEBHOOK_URL
|
||||
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
|
||||
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
|
||||
docker tag humanconnection/nitro-backend humanconnection/nitro-backend:latest;
|
||||
docker push humanconnection/nitro-backend:latest;
|
||||
fi
|
||||
|
||||
after_failure:
|
||||
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
|
||||
- chmod +x send.sh
|
||||
- ./send.sh failure $WEBHOOK_URL
|
||||
@ -1,18 +1,19 @@
|
||||
FROM node:10-alpine
|
||||
LABEL Description="Server part of the social network Human Connection" Vendor="Human-Connection gGmbH" Version="0.0.1" Maintainer="Human-Connection gGmbH (developer@human-connection.org)"
|
||||
LABEL Description="Backend of the Social Network Human-Connection.org" Vendor="Human Connection gGmbH" Version="0.0.1" Maintainer="Human Connection gGmbH (developer@human-connection.org)"
|
||||
|
||||
# expose the app port
|
||||
# Expose the app port
|
||||
EXPOSE 4000
|
||||
|
||||
ARG WORKDIR=/backend
|
||||
|
||||
ARG WORKDIR=/nitro-backend
|
||||
RUN mkdir -p $WORKDIR
|
||||
WORKDIR $WORKDIR
|
||||
|
||||
# Install the Application Dependencies
|
||||
COPY package.json .
|
||||
COPY yarn.lock .
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
|
||||
COPY . .
|
||||
COPY .env.template .env
|
||||
|
||||
CMD ["yarn", "run", "start"]
|
||||
|
||||
@ -2,7 +2,7 @@ version: "3.7"
|
||||
|
||||
services:
|
||||
backend:
|
||||
image: humanconnection/backend:latest
|
||||
image: humanconnection/nitro-backend:latest
|
||||
build: .
|
||||
networks:
|
||||
- hc-network
|
||||
|
||||
@ -31,7 +31,7 @@ spec:
|
||||
value: "false"
|
||||
- name: NEO4J_URI
|
||||
value: bolt://neo4j:7687
|
||||
image: humanconnection/backend:latest
|
||||
image: humanconnection/nitro-backend:latest
|
||||
name: backend
|
||||
ports:
|
||||
- containerPort: 4000
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "GraphQL Backend for Human Connection",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"test": "echo \"Error: no test specified\" && exit 0",
|
||||
"start": "./node_modules/.bin/nodemon --exec babel-node src/index.js",
|
||||
"start:debug": "./node_modules/.bin/nodemon --exec babel-node --inspect=0.0.0.0:9229 src/index.js",
|
||||
"db:seed": "concurrently --kill-others --success first 'cross-env GRAPHQL_URI=http://localhost:4001 PERMISSIONS=disabled GRAPHQL_PORT=4001 yarn run start' 'wait-on tcp:4001 && cross-env GRAPHQL_URI=http://localhost:4001 ./node_modules/.bin/babel-node src/seed/seed-db.js'"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user