Skip to content

Commit b92fc28

Browse files
committed
Build depending on the contracts
1 parent d289fae commit b92fc28

File tree

9 files changed

+31
-2160
lines changed

9 files changed

+31
-2160
lines changed

.ci/Dockerfile.base

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:20-alpine
2+
3+
WORKDIR /usr/src/base
4+
5+
COPY package.json package-lock.json ./
6+
7+
# npm ci is used to install dependencies from package-lock.json
8+
# it saves time on calculating dependencies tree
9+
RUN npm ci
10+
11+
COPY . .

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"name": "ton-drive",
33
"private": true,
4+
"scripts": {
5+
"build": "turbo build"
6+
},
47
"workspaces": [
58
"ton-drive-frontend",
69
"ton-drive-backend",

ton-drive-backend/Dockerfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-alpine
1+
FROM bigfiles-base
22

33
EXPOSE 3000
44

@@ -25,19 +25,15 @@ WORKDIR ${STORAGE_WORK_DIR}
2525
# Allow CLI execution
2626
RUN chmod +x storage-daemon-cli
2727

28-
WORKDIR /usr/src/app
28+
WORKDIR /usr/src/base/ton-drive-backend
2929

30-
# install dependencies
31-
COPY package.json ./
32-
RUN npm install
33-
34-
# copy source code
35-
COPY . .
30+
RUN ln -s /usr/src/base/ton-drive-backend /usr/src/app \
31+
&& rm -rf /usr/src/base/ton-drive-frontend
3632

3733
# build server
3834
RUN npm run build
3935

4036
# remove dev dependencies
41-
RUN npm prune --production
37+
RUN npm prune --production --worspace=ton-drive-backend
4238

4339
CMD ["npm", "run", "start:prod"]

ton-drive-contracts/.gitignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
node_modules
22
temp
3-
# TODO build wrappers in CI and ignore all build artifacts
4-
build/**/*.abi
5-
build/**/*.boc
6-
build/**/*.fif
7-
build/**/*.fc
8-
build/**/*.md
9-
build/**/*.pkg
10-
build/**/*.json
3+
build
114

0 commit comments

Comments
 (0)