From an automation point of view, it would be more convenient to see an Aurelia application as a separate service which requires to run its own tests( e.g. unit/integration/e2e test ), and when all of them passed, get delivered through the CI/CD pipeline, OFC, all should be done by CI/CD pipeline automatically. That being said, I thought that having official docker images, since it is where one will check in the first place, in which almost all required dependencies have been pre-installed for the developers to use, would be a great idea 🙈 just like cypress that has one.
It might be more maintainable and have less burden to have docker images per aurelia-cli versions and with dependencies of aurelia-cli and latest node version. Aurelia applications out there are applications with/without e2e tests, thus, three types of aurelia docker images created:
aurelia/base
has no dependencies installed for e2e tests.
aurelia/cypress
has dependencies installed to run cypress, e.g. Chrome
aurelia/protractor
has dependencies installed to run protractor, e.g. Chrome
and their tags will be the current/latest version of aurelia-cli, currently 1.0.2 and latest. I am not sure yet whether the last two or even all of them can be combined into saying aurelia/e2e image. If so, we will face less confusing aurelia docker images which are also self-explanatory.
I think, that to run unit tests using karma we will still need a browser to be installed, right?; if so, it would be more convenient and less confusing to have one docker image with all required dependencies for all types of configurations.
If everyone is agreed on having such docker images, needless to say, that this repository should be in sync with aurelia-cli repository, and if we are going to accept this PR, then the synchronization is of utmost importance.
The usage of these files would be another Dockerfile for the application which can be used by docker-compose or CI/CD pipeline.
FROM aurelia/base:1.0.2 as build
WORKDIR /app
# install dependencies
COPY ./*.json ./
RUN npm install
# copy application
COPY . .
# RUN UNIT TESTS
RUN au test
# publish stage
FROM build as publish
RUN au build
# runtime
FROM nginx:alpine as run-time
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
COPY --from=publish /app/dist/ .
EXPOSE 80
This PR is made to support #8.
From an automation point of view, it would be more convenient to see an Aurelia application as a separate service which requires to run its own tests( e.g. unit/integration/e2e test ), and when all of them passed, get delivered through the CI/CD pipeline, OFC, all should be done by CI/CD pipeline automatically. That being said, I thought that having official docker images, since it is where one will check in the first place, in which almost all required dependencies have been pre-installed for the developers to use, would be a great idea 🙈 just like
cypress
that has one.It might be more maintainable and have less burden to have docker images per
aurelia-cli
versions and with dependencies ofaurelia-cli
and latestnode
version. Aurelia applications out there are applications with/withoute2e
tests, thus, three types of aurelia docker images created:e2e
tests.and their tags will be the current/latest version of
aurelia-cli
, currently1.0.2
andlatest
. I am not sure yet whether the last two or even all of them can be combined into sayingaurelia/e2e
image. If so, we will face less confusing aurelia docker images which are also self-explanatory.karma
we will still need a browser to be installed, right?; if so, it would be more convenient and less confusing to have one docker image with all required dependencies for all types of configurations.If everyone is agreed on having such docker images, needless to say, that this repository should be in sync with
aurelia-cli
repository, and if we are going to accept this PR, then the synchronization is of utmost importance.The usage of these files would be another
Dockerfile
for the application which can be used bydocker-compose
orCI/CD
pipeline.cc: @EisenbergEffect, @fkleuver, @3cp