Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
github-jenkins-docker-coolify-deployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
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
Harsh Jain
github-jenkins-docker-coolify-deployment
Commits
4a992478
Commit
4a992478
authored
6 months ago
by
Harsh Jain
Browse files
Options
Downloads
Patches
Plain Diff
env added
parent
9c4d7703
Branches
dev
No related tags found
1 merge request
!1
env files removed
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
.dockerignore
+3
-0
3 additions, 0 deletions
.dockerignore
.env
+1
-0
1 addition, 0 deletions
.env
.gitignore
+1
-2
1 addition, 2 deletions
.gitignore
docker.compose.yaml
+11
-0
11 additions, 0 deletions
docker.compose.yaml
dockerfile
+25
-0
25 additions, 0 deletions
dockerfile
index.js
+1
-1
1 addition, 1 deletion
index.js
with
42 additions
and
3 deletions
.dockerignore
0 → 100644
+
3
−
0
View file @
4a992478
node_modules
Dockerfile
.dockerignore
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.env
0 → 100644
+
1
−
0
View file @
4a992478
PORT = 3000
\ No newline at end of file
This diff is collapsed.
Click to expand it.
.gitignore
+
1
−
2
View file @
4a992478
node_modules
\ No newline at end of file
.env
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker.compose.yaml
+
11
−
0
View file @
4a992478
version
:
"
3.8"
services
:
app_server
:
container_name
:
app_server
image
:
app_server:1.0.0
build
:
context
:
.
dockerfile
:
./Dockerfile
command
:
npm run start
env_file
:
.env
ports
:
'
3000:3000'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dockerfile
+
25
−
0
View file @
4a992478
FROM
node:18-alpine
WORKDIR
/app
# Copy package.json and package-lock.json first (this leverages Docker cache for better efficiency)
COPY
package.json .
COPY
package-lock.json .
# Install dependencies
RUN
npm
install
# Copy the rest of the application code
COPY
. .
# Copy .env file if necessary for environment variables
COPY
.env .env
# Expose the application port
EXPOSE
3000
# Command to run the application
CMD
["npm", "start"]
# Optionally, add a health check
# HEALTHCHECK CMD curl --fail http://localhost:3000/ || exit 1
This diff is collapsed.
Click to expand it.
index.js
+
1
−
1
View file @
4a992478
...
...
@@ -9,5 +9,5 @@ app.get('/', (req,res)=>{
});
app
.
listen
(
PORT
,
()
=>
{
console
.
log
(
`Listening to http://localhost:
3001
`
);
console
.
log
(
`Listening to http://localhost:
${
PORT
}
`
);
})
\ 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