mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 09:46:19 +00:00
Add command to spawn a development environment
For development, now doing `npm run dev` will spawn containers with the necessary dependencies for developing and testing the supervisor.
This commit is contained in:
parent
c1e6dadeb4
commit
44f3e9ccdb
@ -101,6 +101,11 @@ COPY src ./src
|
||||
COPY test ./test
|
||||
COPY typings ./typings
|
||||
|
||||
##################################################
|
||||
# CI tests are ran here
|
||||
##################################################
|
||||
FROM test as test-ci
|
||||
|
||||
# Run tests
|
||||
RUN npm run test
|
||||
|
||||
|
25
docker-compose.dev.yml
Normal file
25
docker-compose.dev.yml
Normal file
@ -0,0 +1,25 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
docker:
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
environment:
|
||||
DOCKER_TLS_CERTDIR: ''
|
||||
command: --tls=false --debug
|
||||
|
||||
sut:
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: Dockerfile.template
|
||||
target: test
|
||||
args:
|
||||
# Change this if testing in another architecture
|
||||
ARCH: amd64
|
||||
command: sleep infinity
|
||||
environment:
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
volumes:
|
||||
- './.mochapodrc.yml:/usr/src/app/.mochapodrc.yml'
|
||||
- './src:/usr/src/app/src'
|
||||
- './test:/usr/src/app/test'
|
@ -8,6 +8,8 @@
|
||||
"url": "https://github.com/balena-os/balena-supervisor.git"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "docker-compose -f docker-compose.dev.yml up --build || npm run compose:down",
|
||||
"compose:down": "docker-compose -f docker-compose.dev.yml down",
|
||||
"start": "./entry.sh",
|
||||
"build": "npm run clean && npm run release && webpack",
|
||||
"lint": "balena-lint -e ts -e js --typescript src/ test/ typings/ build-utils/ webpack.config.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user