-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f70862
commit adc3a67
Showing
3 changed files
with
71 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Use an official Node.js runtime as the base image | ||
FROM node:18 | ||
|
||
# Set the working directory in the Docker container to /app | ||
WORKDIR /app/src | ||
|
||
# Copy package.json and package-lock.json to the working directory | ||
COPY package*.json ./ | ||
|
||
# Install any needed packages specified in package.json | ||
RUN npm install | ||
|
||
# Bundle the app source inside the Docker image | ||
# (assuming your app is in the "src" directory of your project) | ||
COPY . . | ||
|
||
# Make port 8080 available to the world outside this container | ||
EXPOSE 8080 | ||
|
||
# Run the app when the container launches | ||
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
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,18 @@ | ||
version: '3' | ||
services: | ||
app: | ||
build: . | ||
ports: | ||
- "${SERVER_PORT}:3000" | ||
depends_on: | ||
- db | ||
environment: | ||
- DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME} | ||
- JWT_SECRET=${JWT_SECRET} | ||
db: | ||
image: postgres:13 | ||
environment: | ||
- POSTGRES_USER=${DB_USER} | ||
- POSTGRES_PASSWORD=${DB_PASSWORD} | ||
- POSTGRES_DB=${DB_NAME} | ||
|