Skip to content

Commit

Permalink
feat: add docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
thangved committed Aug 8, 2023
1 parent 75434c6 commit 1e62709
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:18-alpine

WORKDIR /app

COPY package*.json ./

RUN npm i --force

COPY . .

EXPOSE 3000

CMD ["npx", "serve", "-s", "build"]
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.7'

services:
app:
build:
context: .
dockerfile: Dockerfile
image: anhphat-frontend
volumes:
- ./build:/app/build
ports:
- 3000:3000
command: ['npm', 'run', 'build']

0 comments on commit 1e62709

Please sign in to comment.