Commit Graph

13 Commits

Author SHA1 Message Date
Pablo Carranza Velez
b003f48d7b Switch to using knex migrations to set up the database, and change the database format to use integers for ids instead of strings.
Also includes various improvements and bugfixes to services and the migration from legacy /data to volumes.

The switch ti migrations involves a dirty hack for webpack to properly resolve the paths to the migrations js files - it uses an expression
that webpack can't resolve, so we hardcode it to a value and use the ContextReplacementPlugin to make that value resolve to the migrations folder.

The downsides to this approach are:
- a change in knex code would break this
- the migration code is added twice to the supervisor image: once in the migrations folder (because knex needs to loop through the directory to find the files),
and once inside app.js (because I can't make webpack treat them as external)

Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2018-03-06 10:32:28 -08:00
Pablo Carranza Velez
8dfc559126 Move dindctl to the base of the repository
This makes it easier to use, as it's meant to be used constantly when developing. No need to change PATH
or type `./tools/dev/dindctl`, just run `./dindctl` now.

Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Pablo Carranza Velez
8d84facff5 Add a single Dockerfile to build the supervisor as a multi-stage build
Change-Type: patch
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
2017-07-20 21:22:25 -03:00
Petros Angelatos
488ca41621 build: implement multi-Dockerfile build process
This build strategy lends itself to how Rockerfiles work. In the build
Dockerfile all the build utilities (e.g gcc, python) are installed and
run the build process to produce some build artifacts. There are two
build Dockerfiles, one for the nodejs part and one for the golang part.
The build artifacts of these are combined into the runtime Dockerfile.
For all this to work there is some minimal glue implemented in the
Makefile.

Part of this commit is a switch of the base image the runtime is based
on to the minimal OpenEmbedded one produced by #198

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-09-14 01:38:35 +00:00
Pablo Carranza Vélez
346e36f52b Add a script to retry docker push when deploying 2015-10-13 13:45:04 -03:00
Pablo Carranza Vélez
9bc2f6212d Handle App not found in purge, + cleanup
* gosuper in dockerignored folder
* correctly handle app not found in purge
* test formatting in test-gosuper
* Fix test-gosuper
* DRY up test-integration
2015-10-13 13:43:36 -03:00
Pagan Gazzard
6c2467cca8 Allow running the supervisor in the devenv using docker in docker. 2015-10-13 13:42:23 -03:00
James
c9b149cab2 Update dockerignore file 2015-10-13 13:39:38 -03:00
Eugene Mirotin
c18556a8db dockerignore for editorconfig and coffeelint.json 2015-10-13 13:39:37 -03:00
Pagan Gazzard
ce2c4c8eaa Add .dockerignore and Dockerfile to the .dockerignore, this stops the temporary Dockerfile from invalidating the docker cache. 2015-10-13 13:36:14 -03:00
Pagan Gazzard
a7f546db24 Add the dockerfiles and the makefile to .dockerignore, so they don't take space on the image or invalidate the cache. 2015-10-13 13:36:13 -03:00
Pagan Gazzard
25e7afe4aa Add node_modules to the .dockerignore 2015-10-13 13:36:13 -03:00
Pagan Gazzard
43df63b46b Make sure the .git folder is either removed or not included in the first place. 2015-10-13 13:10:11 -03:00