Add startup script and update Dockerfile and docker-compose.yml
This commit is contained in:
@@ -19,8 +19,13 @@ RUN npm run build
|
||||
# Expose the port that the app is listening on
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
RUN chmod +x ./startup.sh
|
||||
|
||||
# The USER instruction sets the user name to use as the default user for the remainder of the current stage
|
||||
USER node:node
|
||||
|
||||
# This is the command that will be run inside the image when you tell Docker to start the container
|
||||
CMD ["node", "build/index.js"]
|
||||
# get permission to run startup script
|
||||
|
||||
# Run startup.sh instead of the default command
|
||||
CMD ["./startup.sh"]
|
||||
|
||||
Reference in New Issue
Block a user