Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OSM Place Search Logger
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ifs
OSM Place Search Logger
Commits
9b8ab5ef
Commit
9b8ab5ef
authored
1 year ago
by
Ciro Brodmann
Browse files
Options
Downloads
Patches
Plain Diff
rearranged backend dockerfile to have production last
parent
f901c25c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#279558
passed with stage
in 3 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/Dockerfile
+16
-13
16 additions, 13 deletions
backend/Dockerfile
with
16 additions
and
13 deletions
backend/Dockerfile
+
16
−
13
View file @
9b8ab5ef
...
...
@@ -39,30 +39,33 @@ RUN npm ci --only=production && npm cache clean --force
USER
node
###################
#
PRODUCTION
#
DEVELOPMENT
###################
FROM
node:18-alpine
As
production
FROM
node:18-alpine
As
dev
COPY
--chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY
--chown=node:node --from=build /usr/src/app/dist ./dist
RUN
mkdir
/logs
&&
chown
node:node /logs
&&
mkdir
-p
/usr/src/app
&&
chown
node:node /usr/src/app
RUN
mkdir
/logs
&&
chown
node:node /logs
WORKDIR
/usr/src/app
EXPOSE
3000/tcp
VOLUME
[ "/logs" ]
VOLUME
[ "/logs"
, "/usr/src/app"
]
CMD
[ "node", "dist/main.js" ]
#CMD npm run start
CMD
[ "npm", "start" ]
###################
# PRODUCTION
###################
FROM
node:18-alpine
As
dev
FROM
node:18-alpine
As
production
RUN
mkdir
/logs
&&
chown
node:node /logs
&&
mkdir
-p
/usr/src/app
&&
chown
node:node /usr/src/app
COPY
--chown=node:node --from=build /usr/src/app/node_modules ./node_modules
COPY
--chown=node:node --from=build /usr/src/app/dist ./dist
WORKDIR
/usr/src/app
RUN
mkdir
/logs
&&
chown
node:node /logs
EXPOSE
3000/tcp
VOLUME
[ "/logs"
, "/usr/src/app"
]
VOLUME
[ "/logs" ]
#CMD npm run start
CMD
[ "npm", "start" ]
\ No newline at end of file
CMD
[ "node", "dist/main.js" ]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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