Docker infrastructure (#4445)

* Basic docker compose infrastructure

* Fix port mapping problem

* Move files into test folder

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Ethan Jewett 2021-01-25 11:26:18 -06:00 committed by GitHub
parent c48c030a0c
commit c89cff6b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 1 deletions

View File

@ -6,7 +6,11 @@
"merge.ci": "cp zabapgit.abap ci/zabapgit_standalone.prog.abap && cd ci && abaplint && cd ..",
"unit": "rm -rf output && abap_transpile && echo RUNNING && node output/index.js",
"abaplint": "abaplint",
"eslint": "eslint src"
"eslint": "eslint src",
"docker-build": "docker-compose -f test/docker-compose.yml build",
"docker-up": "docker-compose -f test/docker-compose.yml up",
"docker-unit": "docker-compose -f test/docker-compose.yml run --workdir=\"/home/node/abapGit\" abapgit npm run-script unit",
"docker-down": "docker-compose -f test/docker-compose.yml down"
},
"repository": {
"type": "git",

8
test/Dockerfile Normal file
View File

@ -0,0 +1,8 @@
FROM node
ARG TINI_VERSION=v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/local/bin/tini
RUN chmod a+x /usr/local/bin/tini
ENTRYPOINT ["/usr/local/bin/tini", "--"]

21
test/docker-compose.yml Normal file
View File

@ -0,0 +1,21 @@
version: '3.4'
services:
abapgit:
image: abapgit
build:
context: .
dockerfile: ./Dockerfile
environment:
NODE_ENV: development
networks:
default:
volumes:
- ..:/home/node/abapGit
# links:
# - httpEndpoint:httpbin.com
# depends_on:
# - httpEndpoint
# httpEndpoint:
# image: hashicorp/http-echo
# command: -text="Hello World" -listen=:80