generated from azmisahin/azmisahin-software-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
58 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# product | ||
ENV="development" | ||
NAME="template" | ||
APP_ENV="development" | ||
APP_NAME="template" | ||
CONTAINER="linux" | ||
|
||
# build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster | ||
ARG VARIANT=16-bullseye | ||
# base operation system image | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} AS development | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} AS production | ||
|
||
# Metadata indicating an image maintainer. | ||
LABEL maintainer="Azmi ŞAHİN <[email protected]>" | ||
|
||
# product arguments | ||
ARG ENV="development" | ||
ARG NAME="template" | ||
ARG APP_ENV="development" | ||
ARG APP_NAME="template" | ||
|
||
# default arguments for build | ||
ARG WORK_DIR="/template" | ||
|
@@ -18,14 +18,15 @@ ARG DIST_DIR="dist" | |
# default arguments for application | ||
|
||
# product environment | ||
ENV ENV=${ENV} | ||
ENV NAME=${NAME} | ||
ENV APP_ENV=${ENV} | ||
ENV APP_NAME=${NAME} | ||
|
||
# default envionment for build | ||
ENV WORK_DIR=${WORK_DIR} | ||
ENV BUILD_DIR=${BUILD_DIR} | ||
ENV DIST_DIR=${DIST_DIR} | ||
|
||
FROM production AS development | ||
# default environment for application | ||
|
||
# make the 'application' folder the current working directory | ||
|
@@ -46,4 +47,4 @@ RUN mkdir ${BUILD_DIR} && \ | |
mkdir ${DIST_DIR} | ||
|
||
# test | ||
CMD ["node", "--version", "&& echo ${WORK_DIR}/${BUILD_DIR}/${DIST_DIR}/${NAME}"] | ||
CMD ["node", "--version", "&& echo ${WORK_DIR}/${BUILD_DIR}/${DIST_DIR}/${APP_NAME}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# product | ||
ENV="production" | ||
NAME="template" | ||
APP_ENV="production" | ||
APP_NAME="template" | ||
CONTAINER="linux" | ||
|
||
# build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* text=auto eol=lf | ||
*.{cmd,[cC][mM][dD]} text eol=crlf | ||
*.{bat,[bB][aA][tT]} text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ FROM node:latest AS production | |
LABEL maintainer="Azmi ŞAHİN <[email protected]>" | ||
|
||
# product arguments | ||
ARG ENV="production" | ||
ARG NAME="template" | ||
ARG APP_ENV="production" | ||
ARG APP_NAME="template" | ||
|
||
# default arguments for build | ||
ARG WORK_DIR="/template" | ||
|
@@ -17,8 +17,8 @@ ARG DIST_DIR="dist" | |
|
||
|
||
# product environment | ||
ENV ENV=${ENV} | ||
ENV NAME=${NAME} | ||
ENV APP_ENV=${APP_ENV} | ||
ENV APP_NAME=${APP_NAME} | ||
|
||
# default envionment for build | ||
ENV WORK_DIR=${WORK_DIR} | ||
|
@@ -43,4 +43,4 @@ RUN mkdir ${BUILD_DIR} && \ | |
mkdir ${DIST_DIR} | ||
|
||
# test | ||
CMD ["npm", "run", "test:features"] | ||
# CMD ["npm", "run", "test:features"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters