-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from globalfund/feat/docker
feat: docker setup
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
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 @@ | ||
FROM node:16.19.1-alpine3.17 | ||
|
||
# For development add /bin/bash | ||
RUN apk update && apk add --no-cache bash | ||
|
||
# Set up the server directory | ||
WORKDIR /app | ||
COPY . /app | ||
|
||
# Install yarn dependencies | ||
RUN yarn install --network-timeout 100000 | ||
RUN yarn build | ||
|
||
# Install yarn dependencies | ||
RUN yarn global add pm2 | ||
RUN yarn install | ||
RUN yarn build | ||
|
||
# APP LOG DIRECTORY FROM pm2.config.js | ||
RUN mkdir -p /home/zim/app-logs/the-data-explorer-api | ||
|
||
# Run `yarn docker` to build, migrate and run the server with pm2. | ||
CMD ["yarn", "docker"] |
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,15 @@ | ||
FROM node:16.19.1-alpine3.17 | ||
|
||
# For development add /bin/bash | ||
RUN apk update && apk add --no-cache bash | ||
|
||
# Set up the server directory | ||
WORKDIR /app | ||
COPY . /app | ||
|
||
# Install yarn dependencies | ||
RUN yarn install --network-timeout 100000 | ||
RUN yarn build | ||
|
||
# Run `yarn docker` to build, migrate and run the server with pm2. | ||
CMD ["yarn", "dev"] |
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