Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard-clock
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
dashboard-clock
Commits
38ac797b
Commit
38ac797b
authored
3 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Initial docker config.
#12
parent
71ba9946
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.dockerignore
+3
-0
3 additions, 0 deletions
.dockerignore
Dockerfile
+21
-0
21 additions, 0 deletions
Dockerfile
run.sh
+28
-4
28 additions, 4 deletions
run.sh
with
52 additions
and
4 deletions
.dockerignore
0 → 100644
+
3
−
0
View file @
38ac797b
.git
node_modules
dist
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
21
−
0
View file @
38ac797b
FROM
node:lts-alpine
AS
base
LABEL
maintainer="David Trattnig <david.trattnig@subsquare.at>"
# Base Stage
WORKDIR
/aura
COPY
package*.json ./
RUN
npm
install
# Development Stage
FROM
base
AS
dev
EXPOSE
5000
CMD
["./run.sh", "dev"]
# Production Stage
FROM
base
AS
prod
COPY
. .
CMD
["./run.sh", "build"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
run.sh
+
28
−
4
View file @
38ac797b
...
@@ -11,7 +11,7 @@ docker="false"
...
@@ -11,7 +11,7 @@ docker="false"
# - build
# - build
#
#
if
[[
$*
=
~ ^
(
dev|build
)
$
]]
;
then
if
[[
$*
=
~ ^
(
dev|build
|push
)
$
]]
;
then
mode
=
$1
mode
=
$1
fi
fi
...
@@ -42,14 +42,38 @@ if [[ $docker == "false" ]]; then
...
@@ -42,14 +42,38 @@ if [[ $docker == "false" ]]; then
npm run build
npm run build
fi
fi
fi
fi
# +++ DOCKER COMMANDS +++ #
# +++ DOCKER COMMANDS +++ #
if
[[
$docker
==
"true"
]]
;
then
if
[[
$docker
==
"true"
]]
;
then
BASE_D
=
$(
realpath
"
${
BASH_SOURCE
%/*
}
/"
)
BASE_DIR
=
$(
readlink
-f
.
)
echo
"Absolute base dir: "
$BASE_DIR
### Start local development server ###
if
[[
$mode
==
"dev"
]]
;
then
#TODO docker run command for dev server (See dev stage in Dockerfile)
echo
"Missing implementation"
fi
### Create build for use in production ###
if
[[
$mode
==
"prod"
]]
;
then
#TODO docker run command for prod build (See prod stage in Dockerfile)
echo
"Missing implementation"
fi
### Create Docker Image from local project ###
# ~~~ 404 ~~~
if
[[
$mode
==
"build"
]]
;
then
docker build
-t
autoradio/engine-clock
.
fi
### Pushes the latest Docker Image to Docker Hub ###
if
[[
$mode
==
"push"
]]
;
then
docker push autoradio/engine-clock
fi
fi
fi
\ No newline at end of file
This diff is collapsed.
Click to expand it.
David Trattnig
@david
mentioned in issue
#12 (closed)
·
3 years ago
mentioned in issue
#12 (closed)
mentioned in issue #12
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment