File tree Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Expand file tree Collapse file tree 3 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ FROM wger/server:latest
9
9
USER root
10
10
11
11
WORKDIR /home/wger/src
12
- RUN apt-get update && \
13
- apt-get install --no-install-recommends -y \
12
+ RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
13
+ apt update && \
14
+ apt install --no-install-recommends -y \
14
15
git \
15
16
vim \
16
- yarnpkg \
17
+ nodejs \
17
18
sassc \
18
19
&& apt-get clean \
19
20
&& rm -rf /var/lib/apt/lists/* \
@@ -22,6 +23,6 @@ RUN apt-get update && \
22
23
23
24
USER wger
24
25
COPY --chown=wger:wger . /home/wger/src
25
- RUN yarn install \
26
+ RUN yarn install:force \
26
27
&& yarn build:css:sass \
27
28
&& pip3 install --break-system-packages --user --group dev --editable .
Original file line number Diff line number Diff line change @@ -41,14 +41,11 @@ RUN wget -O- https://deb.nodesource.com/setup_22.x | bash - \
41
41
#
42
42
WORKDIR /root/src
43
43
44
- # Copy necessary files to build the application
44
+ # Build the application
45
45
COPY pyproject.toml /root/src
46
46
COPY wger/version.py /root/src/wger/
47
47
COPY wger/__init__.py /root/src/wger/
48
48
COPY README.md /root/src
49
- COPY package.json /root/src
50
- COPY yarn.lock /root/src
51
- COPY wger/core/static /root/src/wger/core/static
52
49
53
50
# NB: the --mount tmpfs is a workaround for https://github.com/rust-lang/cargo/issues/8719
54
51
RUN --mount=type=tmpfs,target=/root/.cargo \
@@ -58,11 +55,10 @@ RUN --mount=type=tmpfs,target=/root/.cargo \
58
55
--group docker . \
59
56
&& ln -s /usr/bin/sassc /usr/bin/sass
60
57
61
- #
62
58
# Build the JS and CSS files
63
- #
64
- RUN yarn config set nodeLinker node-modules \
65
- && yarn install \
59
+ COPY package.json yarn.lock .yarnrc.yml ./
60
+ COPY wger/core/static /root/src/wger/core/static
61
+ RUN yarn install \
66
62
&& yarn build:css:sass \
67
63
&& cd .. \
68
64
&& wget https://github.com/wger-project/react/archive/refs/heads/master.zip \
Original file line number Diff line number Diff line change 3
3
"version" : " 2.4.alpha1" ,
4
4
"description" : " Self hosted FLOSS fitness/workout and weight tracker" ,
5
5
"repository" : " github:wger-project/wger" ,
6
- "author" : " " ,
6
+ "author" :
" wger team <[email protected] > " ,
7
7
"license" : " AGPL-3.0" ,
8
8
"bugs" : {
9
9
"url" : " https://github.com/wger-project/wger/issues"
22
22
},
23
23
"scripts" : {
24
24
"build:css:sass" : " sass wger/core/static/scss/main.scss wger/core/static/yarn/bootstrap-compiled.css" ,
25
- "install" : " yarn install && yarn run postinstall" ,
25
+ "install:force " : " yarn install && yarn run postinstall" ,
26
26
"postinstall" : " rm -rf wger/core/static/yarn/ && mkdir -p wger/core/static/yarn/ && cp -r node_modules/* wger/core/static/yarn/"
27
27
},
28
28
"engines" : {
You can’t perform that action at this time.
0 commit comments