Skip to content

Commit

Permalink
Merge pull request #4 from linuxserver/3.18
Browse files Browse the repository at this point in the history
Rebase to Alpine 3.18, standardize nginx default site conf
  • Loading branch information
nemchik authored May 30, 2023
2 parents d56d75f + ea6adee commit 6a680aa
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 17 deletions.
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as server-buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.18 as server-buildstage

# set version label
ARG BUILD_DATE
Expand All @@ -10,6 +10,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="thespad"

RUN \
echo "**** install server-buildstage packages ****" && \
apk -U --update --no-cache add --virtual=server-build-dependencies \
build-base \
cmake \
Expand Down Expand Up @@ -38,13 +39,14 @@ RUN \
rm -rf \
/tmp/*

FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as client-buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.18 as client-buildstage

ARG NODE_ENV ${NODE_ENV:-production}

COPY --from=server-buildstage /app/www/client /app/www/client

RUN \
echo "**** install client-buildstage packages ****" && \
apk -U --update --no-cache add --virtual=client-build-dependencies \
build-base \
cmake \
Expand All @@ -63,7 +65,7 @@ RUN \
rm -rf \
/tmp/*

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.18

ARG BUILD_DATE
ARG VERSION
Expand All @@ -78,23 +80,28 @@ COPY --from=server-buildstage /app/www/server/package.json /app/www/server/packa
COPY --from=server-buildstage /app/www/server/lib/ /app/www/server/lib/

RUN \
echo "**** install build packages ****" && \
apk -U --update --no-cache add --virtual=build-dependencies \
build-base \
cmake \
python3-dev && \
echo "**** install runtime packages ****" && \
apk add -U --update --no-cache \
nodejs \
npm \
yarn && \
echo "**** install your_spotify ****" && \
npm install -g serve && \
cd /app/www/server && \
yarn --production && \
yarn cache clean && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
$HOME/.npm \
/tmp/*
/tmp/* \
$HOME/.cache \
$HOME/.npm

COPY /root /

Expand Down
17 changes: 12 additions & 5 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as server-buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.18 as server-buildstage

# set version label
ARG BUILD_DATE
Expand All @@ -10,6 +10,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="thespad"

RUN \
echo "**** install server-buildstage packages ****" && \
apk -U --update --no-cache add --virtual=server-build-dependencies \
build-base \
cmake \
Expand Down Expand Up @@ -38,13 +39,14 @@ RUN \
rm -rf \
/tmp/*

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.17 as client-buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.18 as client-buildstage

ARG NODE_ENV ${NODE_ENV:-production}

COPY --from=server-buildstage /app/www/client /app/www/client

RUN \
echo "**** install client-buildstage packages ****" && \
apk -U --update --no-cache add --virtual=client-build-dependencies \
build-base \
cmake \
Expand All @@ -63,7 +65,7 @@ RUN \
rm -rf \
/tmp/*

FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.18

ARG BUILD_DATE
ARG VERSION
Expand All @@ -78,23 +80,28 @@ COPY --from=server-buildstage /app/www/server/package.json /app/www/server/packa
COPY --from=server-buildstage /app/www/server/lib/ /app/www/server/lib/

RUN \
echo "**** install build packages ****" && \
apk -U --update --no-cache add --virtual=build-dependencies \
build-base \
cmake \
python3-dev && \
echo "**** install runtime packages ****" && \
apk add -U --update --no-cache \
nodejs \
npm \
yarn && \
echo "**** install your_spotify ****" && \
npm install -g serve && \
cd /app/www/server && \
yarn --production && \
yarn cache clean && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
$HOME/.npm \
/tmp/*
/tmp/* \
$HOME/.cache \
$HOME/.npm

COPY /root /

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **23.01.23:** - Rebase to Alpine 3.18, standardize nginx default site conf.
* **23.01.23:** - Initial Release.
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ app_setup_block: |
# changelog
changelogs:
- { date: "23.01.23:", desc: "Rebase to Alpine 3.18, standardize nginx default site conf." }
- { date: "23.01.23:", desc: "Initial Release." }
24 changes: 17 additions & 7 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
## Version 2023/04/13 - Changelog: https://github.com/linuxserver/docker-your_spotify/commits/main/root/defaults/nginx/site-confs/default.conf.sample

server {
listen 80 default_server;
listen [::]:80 default_server;

listen 443 ssl;

root /app/www/client/build;
index index.php index.html index.htm;
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;

server_name _;

ssl_certificate /config/keys/cert.crt;
ssl_certificate_key /config/keys/cert.key;
include /config/nginx/ssl.conf;

client_max_body_size 0;
root /app/www/client/build;
index index.html index.htm index.php;

location / {
# enable for basic auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;

try_files $uri $uri/ /index.html;
}

Expand All @@ -22,4 +27,9 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_pass http://localhost:8080/;
}

# deny access to .htaccess/.htpasswd files
location ~ /\.ht {
deny all;
}
}

0 comments on commit 6a680aa

Please sign in to comment.