Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit f5d8b38

Browse files
committed
A couple of build fixes
These changes reflect the more complex build process we get by commit 39e10a3.
1 parent 39e10a3 commit f5d8b38

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

build_dbhub.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ if [ ! -e "${DEST}/lib/libsqlite3.so" ]; then
3939
fi
4040

4141
# Compile JSX files and build webpack bundle
42-
npm install
43-
cd webui
44-
yarn run babel jsx --out-dir js --presets babel-preset-react-app/prod
45-
yarn run webpack
46-
cd ..
42+
yarn
43+
yarn run babel webui/jsx --out-dir webui/js --presets babel-preset-react-app/prod
44+
yarn run webpack -c webui/webpack.config.js
4745

4846
# Builds the Go binaries
4947
if [ -d "${GOBIN}" ]; then

docker/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LABEL maintainer="Justin Clift <[email protected]>"
77
RUN \
88
apk update && \
99
apk upgrade && \
10-
apk add --no-cache ca-certificates 'curl>7.61.0' git go libc-dev memcached postgresql sqlite-dev
10+
apk add --no-cache ca-certificates 'curl>7.61.0' git go libc-dev memcached postgresql sqlite-dev yarn
1111

1212
# Create the DBHub.io OS user
1313
RUN addgroup dbhub && \
@@ -104,7 +104,11 @@ RUN echo "echo 127.0.0.1 docker-dev.dbhub.io docker-dev >> /etc/hosts" >> /usr/l
104104
echo "done" >> /usr/local/bin/start.sh
105105

106106
# Create script to compile DBHub.io daemons
107-
RUN echo "cd ${DBHUB_SOURCE}/api" >> /usr/local/bin/compile.sh && \
107+
RUN echo "cd ${DBHUB_SOURCE}" >> /usr/local/bin/compile.sh && \
108+
echo "yarn" >> /usr/local/bin/compile.sh && \
109+
echo "yarn run babel ${DBHUB_SOURCE}/webui/jsx --out-dir ${DBHUB_SOURCE}/webui/js --presets babel-preset-react-app/prod" >> /usr/local/bin/compile.sh && \
110+
echo "yarn run webpack -c ${DBHUB_SOURCE}/webui/webpack.config.js" >> /usr/local/bin/compile.sh && \
111+
echo "cd ${DBHUB_SOURCE}/api" >> /usr/local/bin/compile.sh && \
108112
echo "go build -gcflags \"all=-N -l\" -buildvcs=false -o /usr/local/bin/dbhub-api ." >> /usr/local/bin/compile.sh && \
109113
echo "cd ${DBHUB_SOURCE}/db4s" >> /usr/local/bin/compile.sh && \
110114
echo "go build -gcflags \"all=-N -l\" -buildvcs=false -o /usr/local/bin/dbhub-db4s ." >> /usr/local/bin/compile.sh && \
@@ -155,7 +159,6 @@ RUN echo "# Kill the existing running daemons" >> /usr/local/bin/debug.sh && \
155159

156160
# Build the DBHub.io daemons
157161
RUN cd / && git clone --branch master --depth 5 https://github.com/sqlitebrowser/dbhub.io
158-
VOLUME ${DBHUB_SOURCE}
159162
RUN /usr/local/bin/compile.sh
160163

161164
# Initialise PostgreSQL and Minio

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"dependencies": {
3-
"@babel/cli": "^7.20.7",
43
"babel-preset-react": "^6.24.1",
54
"babel-preset-react-app": "^10.0.1",
65
"cypress": "^12.3.0",
@@ -41,6 +40,7 @@
4140
"license": "AGPL-3.0-or-later",
4241
"private": false,
4342
"devDependencies": {
43+
"@babel/cli": "^7.20.7",
4444
"webpack": "^5.75.0",
4545
"webpack-cli": "^5.0.1"
4646
}

webui/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ const path = require("path");
22

33
module.exports = {
44
mode: "production", // Change to "development" for debugging purposes
5-
entry: "./js/app.js",
5+
entry: "./webui/js/app.js",
66
output: {
77
filename: "dbhub.js",
8-
path: path.resolve(__dirname, "js")
8+
path: path.resolve(__dirname, "webui/js")
99
}
1010
};

0 commit comments

Comments
 (0)