Skip to content

Commit

Permalink
Improve docker setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
PerminovEugene committed Sep 27, 2024
1 parent f5ea441 commit b225f2c
Show file tree
Hide file tree
Showing 70 changed files with 15,220 additions and 31,132 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
Binary file added .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
14 changes: 0 additions & 14 deletions Dockerfile.deploy

This file was deleted.

20 changes: 10 additions & 10 deletions Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM node:18
FROM node:20

RUN yarn set version 4.5.0

WORKDIR /app

COPY yarn.lock .
EXPOSE 8545

COPY package.json .
COPY yarn.lock .
COPY .yarnrc.yml .
COPY .yarn .

COPY packages/blockchain/package.json ./packages/blockchain/
COPY packages/blockchain/package.json ./packages/blockchain/

RUN yarn install
RUN yarn workspaces focus @nft-open-marketplace/blockchain

WORKDIR /app/packages/blockchain

RUN yarn install

EXPOSE 8545

CMD ["npm", "run", "node"]
10 changes: 6 additions & 4 deletions Dockerfile.ui
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
FROM node:18

RUN yarn set version 4.5.0

WORKDIR /app

COPY yarn.lock .
COPY package.json .
COPY yarn.lock .
COPY .yarnrc.yml .
COPY .yarn .

COPY packages/ui/package.json ./packages/ui/

RUN yarn install
RUN yarn workspaces focus @nft-open-marketplace/ui

WORKDIR /app/packages/ui

RUN yarn install

EXPOSE 3000
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openMarketplaceNFT-market
# nft-open-marketplace

Collection of Perminov Eugene's NFTs
Simple marketplace for buying and selling nfts.

## Local dev

Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ services:
ports:
- "8545:8545"
volumes:
- .:/app
- /app/node_modules
- ./packages/blockchain:/app/packages/blockchain
networks:
- hardhat-net
command: "yarn run node"
env_file:
- .env

deploy-blockchain:
build:
context: .
dockerfile: ./Dockerfile.deploy
dockerfile: ./Dockerfile.node
depends_on:
- blockchain
networks:
Expand Down
Loading

0 comments on commit b225f2c

Please sign in to comment.