Skip to content

Commit

Permalink
Add Docker configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
danishjoseph committed Apr 21, 2024
1 parent 9858af4 commit 0b11655
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
test
.dockerignore
Dockerfile
README.md
.env
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:21-alpine

WORKDIR /app

COPY package.json ./

COPY yarn.lock ./

RUN yarn install

COPY . .

RUN yarn build

EXPOSE 3000

CMD [ "yarn", "start:prod" ]
31 changes: 18 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
version: '3.8'
services:
db:
image: postgres:13
environment:
version: '3.8'

services:
db:
image: postgres:13
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data

volumes:
db-data:
ports:
- '5432:5432'
volumes:
- db-data:/var/lib/postgresql/data
networks:
- stockdog

volumes:
db-data:

networks:
stockdog:

0 comments on commit 0b11655

Please sign in to comment.