-
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.
dockerizing project by creating containers for app & postgres (#110)
fix minor issue in deployment of render latest commit Update Readme file to include Docker-specific information Update Readme file to include Docker-specific information
- Loading branch information
1 parent
f7e2d7f
commit d8d8721
Showing
5 changed files
with
56 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,5 @@ | ||
/node_modules | ||
/coverage | ||
Dockerfile | ||
.dockerignore | ||
docker-compose.yaml |
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,11 @@ | ||
FROM node:latest | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
RUN npm install | ||
|
||
COPY . . | ||
|
||
EXPOSE 3000 | ||
CMD ["npm", "run", "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
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 @@ | ||
version: '3' | ||
services: | ||
db: | ||
image: postgres | ||
environment: | ||
POSTGRES_PASSWORD: ${DB_PASSWORD_DEV} | ||
POSTGRES_USER: ${DB_USER_DEV} | ||
POSTGRES_DB: ${DB_NAME_DEV} | ||
ports: | ||
- '5431:5432' | ||
|
||
app: | ||
build: . | ||
ports: | ||
- '8080:3000' | ||
depends_on: | ||
- db | ||
volumes: | ||
- .:/usr/src/app | ||
- /usr/src/app/node_modules | ||
env_file: | ||
- .env |
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 |
---|---|---|
|
@@ -47,4 +47,4 @@ const config: { | |
production, | ||
}; | ||
|
||
export default config[env]; | ||
export default config[env]; |