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
version: '3' | |
services: | |
backend-test: | |
build: | |
context: ../ | |
dockerfile: docker/Dockerfile.test | |
args: | |
port: ${PORT} | |
env_file: | |
- ../.env |
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
FROM docker_backend | |
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait | |
RUN chmod +x /wait | |
ENV NODE_ENV dev | |
RUN npm install && npm install -g mocha | |
ARG port=80 | |
CMD /wait && mocha test/unitTests.js --exit |
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
FROM node:10.12.0-alpine | |
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait /wait | |
RUN chmod +x /wait | |
WORKDIR /home/nodejs/app | |
ENV NODE_ENV prod | |
COPY package*.json ./ | |
RUN npm install --only=production | |
ARG port=80 | |
EXPOSE $port | |
COPY . ./ |
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
"scripts": { | |
"test": "docker-compose -f docker/docker-compose.test.yml up --build --abort-on-container-exit", | |
"production": "docker-compose -f docker/docker-compose.yml up -d", | |
"build": "docker-compose -f docker/docker-compose.yml build" | |
} |
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
version: '3' | |
services: | |
backend: | |
build: | |
context: ../ | |
dockerfile: docker/Dockerfile.production | |
args: | |
port: ${PORT} | |
env_file: | |
- ../.env |
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
const test = require('tape') | |
const request = require('supertest') | |
const express = require('express') | |
const Document = require('../models/Document') | |
const app = require('../index') | |
let documentId | |
before(done => { | |
app.on( 'APP_STARTED', () => { |
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
services: docker | |
before_install: | |
- docker -v | |
- cp example.env .env | |
- sudo /etc/init.d/postgresql stop | |
- sudo service mysql stop | |
install: | |
- npm run build |
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
MONGO_INITDB_ROOT_USERNAME=example | |
MONGO_INITDB_ROOT_PASSWORD=example | |
MONGO_INITDB_DATABASE=api | |
MONGO_DATA_DIR=/data/db | |
MONGO_TEST_DATA_DIR=/data/test_db | |
MONGO_LOG_FILE=/var/log/mongodb/mongodb.log | |
PORT=80 |
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
.env | |
node_modules/ | |
data/ | |
docker/data/ |
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
.env | |
node_modules/ | |
data/ | |
LICENSE | |
README.md | |
.gitignore | |
.git/ | |
example.env | |
.travis.yml | |
docker/ |
NewerOlder