Skip to content
Permalink
Browse files

feat(docker): add Dockerfile && docker-compose file

  • Loading branch information
shahabganji authored and 3cp committed Sep 5, 2019
1 parent 61f3ada commit 4ed59ab42ec327b065c2f3c67bc397dfc7c6e67b
Showing with 35 additions and 8 deletions.
  1. +27 −8 skeleton/common/Dockerfile__if_docker
  2. +8 −0 skeleton/common/docker-compose.yml__if_docker
@@ -1,8 +1,6 @@
# build stage
FROM node:12 as build

RUN npm install -g aurelia-cli

// @if feat.cypress || feat.protractor || feat.karma
ENV DEBIAN_FRONTEND=noninteractive

@@ -50,24 +48,35 @@ RUN curl --silent --show-error --location --fail --retry 3 --output /tmp/google-

// @endif

RUN npm install -g aurelia-cli@1.1.0


WORKDIR /app

# install dependencies
COPY ./*.json ./
RUN npm install

# copy other files
COPY ./*.config.js ./
COPY ./*.ejs ./
COPY ./*.ico ./
COPY config ./config
COPY aurelia_project ./aurelia_project

# COPY application
// @if feat.typescript && feat.webpack
COPY types ./types
// @endif

// @if feat.webpack
COPY static ./static
// @endif

# Copy files in the root folder
COPY *.* ./

# Copy source files
COPY src ./src


// @if feat.cypress || feat.protractor || feat.jest || feat.karma
# Copy test, unit & e2e
COPY test ./test
// @endif

@@ -81,7 +90,6 @@ RUN au test
RUN npm run e2e:headless
// @endif


# build
FROM build as publish
RUN au build
@@ -90,7 +98,18 @@ RUN au build
FROM nginx:alpine as run-time
COPY nginx.conf /etc/nginx/nginx.conf
WORKDIR /usr/share/nginx/html
// @if feat.webpack
COPY --from=publish /app/dist/ .
// @endif

// @if feat["cli-bundler"]
// @if feat["scaffold-navigation"]
COPY --from=publish /app/bootstrap/dist/ ./bootstrap/dist/
// @endif
COPY --from=publish /app/scripts/ ./scripts/
COPY --from=publish /app/index.html/ .
// @endif

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
@@ -0,0 +1,8 @@
version: "3.7"

services:
/* @echo projectName */:
image: /* @echo projectName */:0.1.0
ports:
- "5050:80"
restart: unless-stopped

0 comments on commit 4ed59ab

Please sign in to comment.
You can’t perform that action at this time.