-
Notifications
You must be signed in to change notification settings - Fork 0
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
bba0118
commit 4337ed3
Showing
2 changed files
with
26 additions
and
16 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,23 @@ | ||
# Use the official Node.js image | ||
FROM node:alpine | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and yarn.lock | ||
COPY package.json yarn.lock ./ | ||
|
||
# Install dependencies | ||
RUN yarn install | ||
|
||
# Copy the rest of the app | ||
COPY . . | ||
|
||
# Build the app | ||
RUN yarn build | ||
|
||
# Expose the port the app runs on | ||
EXPOSE 3000 | ||
|
||
# Command to run the app | ||
CMD ["yarn", "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 |
---|---|---|
@@ -1,20 +1,7 @@ | ||
version: '3.9' | ||
|
||
services: | ||
app: | ||
image: node:14-alpine | ||
container_name: ims_corp_development | ||
working_dir: /app | ||
command: sh -c "yarn install && yarn build && yarn start" | ||
volumes: | ||
- .:/app | ||
build: . | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
- NODE_ENV=production | ||
restart: unless-stopped | ||
networks: | ||
- ims_network | ||
|
||
networks: | ||
ims_network: | ||
driver: bridge | ||
- '3000:3000' |