-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Docker image not working #753
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
57cf63b
fix: Docker image not working
Ch4s3r cc7ed2c
Update docker.yml
Ch4s3r ed5d0ca
chore: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r c72c2d4
feat: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r 14ae2c9
chore: lowercase REGISTRY_IMAGE for docker image naming convention
Ch4s3r 5e3abe8
chore: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r 1d8eb96
chore: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r d6b9d9c
chore: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r bfd853b
chore: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r 60ea3c0
chore: update REGISTRY_IMAGE environment variable in Docker workflow
Ch4s3r 1f6715c
fix: Docker image not working
Ch4s3r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,4 +1,38 @@ | ||
# Include any files or directories that you don't want to be copied to your | ||
# container here (e.g., local build artifacts, temporary files, etc.). | ||
# | ||
# For more help, visit the .dockerignore file reference guide at | ||
# https://docs.docker.com/go/build-context-dockerignore/ | ||
|
||
npm-debug.log | ||
*.pem | ||
.env | ||
coverage | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
**/.toolstarget | ||
**/.vs | ||
**/.vscode | ||
**/.next | ||
**/.cache | ||
**/*.*proj.user | ||
**/*.dbmdl | ||
**/*.jfm | ||
**/charts | ||
**/docker-compose* | ||
**/compose.y*ml | ||
**/Dockerfile* | ||
**/node_modules | ||
**/npm-debug.log | ||
**/obj | ||
**/secrets.dev.yaml | ||
**/values.dev.yaml | ||
**/build | ||
**/dist | ||
LICENSE | ||
README.md |
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,13 +1,38 @@ | ||
FROM node:16 | ||
# syntax=docker/dockerfile:1 | ||
|
||
WORKDIR /app | ||
# Comments are provided throughout this file to help you get started. | ||
# If you need more help, visit the Dockerfile reference guide at | ||
# https://docs.docker.com/go/dockerfile-reference/ | ||
|
||
COPY package*.json ./ | ||
RUN npm ci --only=production | ||
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7 | ||
|
||
ARG NODE_VERSION=18 | ||
|
||
FROM node:${NODE_VERSION}-alpine | ||
|
||
# Use production node environment by default. | ||
ENV NODE_ENV production | ||
|
||
|
||
WORKDIR /usr/src/app | ||
|
||
# Download dependencies as a separate step to take advantage of Docker's caching. | ||
# Leverage a cache mount to /root/.npm to speed up subsequent builds. | ||
# Leverage a bind mounts to package.json and package-lock.json to avoid having to copy them into | ||
# into this layer. | ||
RUN --mount=type=bind,source=package.json,target=package.json \ | ||
--mount=type=bind,source=package-lock.json,target=package-lock.json \ | ||
--mount=type=cache,target=/root/.npm \ | ||
npm ci --omit=dev | ||
|
||
# Run the application as a non-root user. | ||
USER node | ||
|
||
# Copy the rest of the source files into the image. | ||
COPY . . | ||
|
||
ENV PORT=${PORT:-3000} | ||
USER 1000:1000 | ||
# Expose the port that the application listens on. | ||
EXPOSE 3000 | ||
|
||
CMD ./node_modules/probot/bin/probot.js run --port $PORT ./index.js | ||
# Run the application. | ||
CMD npm start |
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,51 @@ | ||
# Comments are provided throughout this file to help you get started. | ||
# If you need more help, visit the Docker Compose reference guide at | ||
# https://docs.docker.com/go/compose-spec-reference/ | ||
|
||
# Here the instructions define your application as a service called "server". | ||
# This service is built from the Dockerfile in the current directory. | ||
# You can add other services your application may depend on here, such as a | ||
# database or a cache. For examples, see the Awesome Compose repository: | ||
# https://github.com/docker/awesome-compose | ||
services: | ||
server: | ||
build: | ||
context: . | ||
environment: | ||
NODE_ENV: production | ||
ports: | ||
- 3000:3000 | ||
|
||
# The commented out section below is an example of how to define a PostgreSQL | ||
# database that your application can use. `depends_on` tells Docker Compose to | ||
# start the database before your application. The `db-data` volume persists the | ||
# database data between container restarts. The `db-password` secret is used | ||
# to set the database password. You must create `db/password.txt` and add | ||
# a password of your choosing to it before running `docker-compose up`. | ||
# depends_on: | ||
# db: | ||
# condition: service_healthy | ||
# db: | ||
# image: postgres | ||
# restart: always | ||
# user: postgres | ||
# secrets: | ||
# - db-password | ||
# volumes: | ||
# - db-data:/var/lib/postgresql/data | ||
# environment: | ||
# - POSTGRES_DB=example | ||
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password | ||
# expose: | ||
# - 5432 | ||
# healthcheck: | ||
# test: [ "CMD", "pg_isready" ] | ||
# interval: 10s | ||
# timeout: 5s | ||
# retries: 5 | ||
# volumes: | ||
# db-data: | ||
# secrets: | ||
# db-password: | ||
# file: db/password.txt | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added changelog entry for previous PR