Skip to content
This repository was archived by the owner on Feb 11, 2023. It is now read-only.

Commit b69fc7a

Browse files
committed
Rebase to 3.17, migrate to s6v3
1 parent 77efb27 commit b69fc7a

File tree

19 files changed

+89
-81
lines changed

19 files changed

+89
-81
lines changed

.github/workflows/call-baseimage-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
with:
1212
repo_owner: ${{ github.repository_owner }}
1313
baseimage: "alpine-nginx"
14-
basebranch: "3.15"
14+
basebranch: "3.17"
1515
app_name: "your_spotify"
1616
secrets:
1717
repo_release_token: ${{ secrets.repo_release_token }}

Dockerfile

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as server-buildstage
1+
# syntax=docker/dockerfile:1
2+
3+
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as server-buildstage
24

35
# set version label
46
ARG BUILD_DATE
@@ -9,11 +11,6 @@ RUN \
911
apk -U --update --no-cache add --virtual=server-build-dependencies \
1012
build-base \
1113
cmake \
12-
curl \
13-
gcc \
14-
g++ \
15-
jq \
16-
make \
1714
npm \
1815
python3-dev \
1916
yarn && \
@@ -25,11 +22,11 @@ RUN \
2522
curl -o \
2623
/tmp/your_spotify.tar.gz -L \
2724
"https://github.com/Yooooomi/your_spotify/archive/${APP_VERSION}.tar.gz" && \
28-
mkdir -p /app/your_spotify && \
25+
mkdir -p /app/www && \
2926
tar xzf \
3027
/tmp/your_spotify.tar.gz -C \
31-
/app/your_spotify/ --strip-components=1 && \
32-
cd /app/your_spotify/server && \
28+
/app/www/ --strip-components=1 && \
29+
cd /app/www/server && \
3330
sed -i '/"extends": "..\/tsconfig.json"/d' tsconfig.json && \
3431
yarn --dev --frozen-lockfile && \
3532
yarn build && \
@@ -39,25 +36,22 @@ RUN \
3936
rm -rf \
4037
/tmp/*
4138

42-
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as client-buildstage
39+
FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as client-buildstage
4340

4441
ARG NODE_ENV
4542
ENV NODE_ENV ${NODE_ENV:-production}
4643

47-
COPY --from=server-buildstage /app/your_spotify/client /app/your_spotify/client
44+
COPY --from=server-buildstage /app/www/client /app/www/client
4845

4946
RUN \
5047
apk -U --update --no-cache add --virtual=client-build-dependencies \
5148
build-base \
5249
cmake \
53-
gcc \
54-
g++ \
55-
make \
5650
npm \
5751
python3-dev \
5852
yarn && \
5953
echo "*** install your_spotify client ***" && \
60-
cd /app/your_spotify/client && \
54+
cd /app/www/client && \
6155
sed -i '/"extends": "..\/tsconfig.json"/d' tsconfig.json && \
6256
npm install -g nodemon && \
6357
yarn --production=false --frozen-lockfile --network-timeout 60000 && \
@@ -68,7 +62,7 @@ RUN \
6862
rm -rf \
6963
/tmp/*
7064

71-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.15
65+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
7266

7367
ARG BUILD_DATE
7468
ARG VERSION
@@ -77,24 +71,21 @@ LABEL maintainer="thespad"
7771

7872
ENV HOME=/app
7973

80-
COPY --from=client-buildstage /app/your_spotify/client/build/ /app/your_spotify/client/build/
81-
COPY --from=server-buildstage /app/your_spotify/server/package.json /app/your_spotify/server/package.json
82-
COPY --from=server-buildstage /app/your_spotify/server/lib/ /app/your_spotify/server/lib/
74+
COPY --from=client-buildstage /app/www/client/build/ /app/www/client/build/
75+
COPY --from=server-buildstage /app/www/server/package.json /app/www/server/package.json
76+
COPY --from=server-buildstage /app/www/server/lib/ /app/www/server/lib/
8377

8478
RUN \
8579
apk -U --update --no-cache add --virtual=build-dependencies \
8680
build-base \
8781
cmake \
88-
gcc \
89-
g++ \
9082
python3-dev && \
9183
apk add -U --update --no-cache \
92-
curl \
9384
nodejs \
9485
npm \
9586
yarn && \
9687
npm install -g serve && \
97-
cd /app/your_spotify/server && \
88+
cd /app/www/server && \
9889
yarn --production && \
9990
yarn cache clean && \
10091
apk del --purge \

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
246246

247247
## Versions
248248

249+
* **23.01.23:** - Rebase to Alpine 3.17, migrate to s6v3.
249250
* **23.02.22:** - Initial Release.

release-versions/alpine-nginx-master.txt

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<html>
2+
<head>
3+
<title>Upgrade Required!</title>
4+
<style>
5+
body{
6+
font-family: Helvetica, Arial, sans-serif;
7+
}
8+
.message{
9+
width:440px;
10+
padding:20px 40px;
11+
margin:0 auto;
12+
background-color:#f9f9f9;
13+
border:1px solid #ddd;
14+
color: #1e3d62;
15+
}
16+
center{
17+
margin:40px 0;
18+
}
19+
h1{
20+
font-size: 18px;
21+
line-height: 26px;
22+
}
23+
p{
24+
font-size: 12px;
25+
}
26+
a{
27+
color: rgb(207, 48, 139);
28+
}
29+
</style>
30+
</head>
31+
<body>
32+
<div class="message">
33+
<h1>Upgrade Required!</h1>
34+
<p>The application inside this image has been moved to a new folder.</p>
35+
<p>You will need to update your <strong>/config/nginx/nginx.conf</strong> and <strong>/config/nginx/site-confs/default.conf</strong> in order for the application to work.</p>
36+
<p>New config samples are located at <strong>/config/nginx/nginx.conf.sample</strong> and <strong>/config/nginx/site-confs/default.conf.sample</strong></p>
37+
<p>Please review our announcement: <a target="_blank" href="https://info.linuxserver.io/issues/2022-08-20-nginx-base/">Significant changes to nginx based images</a></p>
38+
</div>
39+
</body>
40+
</html>

root/defaults/nginx/site-confs/default.conf.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ server {
33

44
listen 443 ssl;
55

6-
root /app/your_spotify/client/build;
6+
root /app/www/client/build;
77
index index.php index.html index.htm;
88

99
server_name _;

root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-your_spotify-config

Whitespace-only changes.

root/etc/s6-overlay/s6-rc.d/init-your_spotify-config/dependencies.d/init-nginx-end

Whitespace-only changes.

root/etc/cont-init.d/50-config renamed to root/etc/s6-overlay/s6-rc.d/init-your_spotify-config/run

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
23

3-
VAR_PATH="/app/your_spotify/client/build"
4+
VAR_PATH="/app/www/client/build"
45

5-
cp "$VAR_PATH/variables.js" "$VAR_PATH/variables-final.js"
6+
cp "$VAR_PATH/variables-template.js" "$VAR_PATH/variables.js"
67

78
export API_ENDPOINT="${APP_URL}/api"
89

9-
if [ -n "$API_ENDPOINT" ]
10-
then
10+
if [[ -n "$API_ENDPOINT" ]]; then
1111
echo "Setting API Endpoint to '$API_ENDPOINT'"
12-
sed -i "s;__API_ENDPOINT__;$API_ENDPOINT;g" "$VAR_PATH/variables-final.js"
12+
sed -i "s;__API_ENDPOINT__;$API_ENDPOINT;g" "$VAR_PATH/variables.js"
1313
else
1414
echo "API_ENDPOINT is not defined, web app won't work"
1515
exit 1
1616
fi
1717

1818
HOME="/app"
1919

20-
chown -R abc:abc \
20+
lsiown -R abc:abc \
2121
/app
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oneshot

0 commit comments

Comments
 (0)