Skip to content

Commit

Permalink
introduced basic Dockerfile and docker-compose.yml file. npm run db:i…
Browse files Browse the repository at this point in the history
…nit is not done yet
  • Loading branch information
tram98 committed Nov 7, 2024
1 parent cceef56 commit c5df0f6
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
50 changes: 50 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
volumes:
db:
phpmyadmin:


networks:
bymr:


services:
web:
build: ./server
environment:
- BASE_URL=localhost
- PORT=3001
- DB_NAME=bymr
- DB_HOST=db
- DB_PORT=3306
- DB_USER=bymr
- DB_PASSWORD=bymr
networks:
- bymr
ports:
- 3001:3001
depends_on:
- db
db:
image: mariadb:lts
environment:
- MARIADB_ROOT_PASSWORD=root
- MARIADB_USER=bymr
- MARIADB_PASSWORD=bymr
- MARIADB_DATABASE=bymr
ports:
- 3306:3306
networks:
- bymr
volumes:
- db:/var/lib/mysql
phpmyadmin:
image: phpmyadmin:5
environment:
- MYSQL_ROOT_PASSWORD=root
- PMA_HOST=db
ports:
- 8080:80
networks:
- bymr
depends_on:
- db
11 changes: 11 additions & 0 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:latest

RUN mkdir /app

WORKDIR /app

COPY . /app

RUN npm i

ENTRYPOINT ["npm", "run", "serve"]

0 comments on commit c5df0f6

Please sign in to comment.