Skip to content

Commit

Permalink
Update Dependencies, Use slim alpine inginx
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorsApps committed Feb 11, 2023
1 parent 84799ff commit a4748fc
Show file tree
Hide file tree
Showing 8 changed files with 2,032 additions and 1,523 deletions.
3 changes: 1 addition & 2 deletions .docker/DockerfileLocal
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM node:18-alpine

WORKDIR /app

COPY package*.json .

RUN npm install

CMD npm start
CMD ["npm", "start"]
3 changes: 1 addition & 2 deletions .docker/DockerfileSnapcastClient
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM debian:bullseye

FROM debian:bullseye-slim
WORKDIR /app

RUN dpkg --add-architecture armhf
Expand Down
6 changes: 2 additions & 4 deletions .docker/DockerfileSnapcastServer
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM debian:bullseye


FROM debian:bullseye-slim
WORKDIR /app

RUN apt update && apt upgrade -y
Expand All @@ -21,4 +19,4 @@ RUN rm -rf /var/lib/apt/lists/*

COPY .docker/snapserver.conf /etc/snapserver.conf

ENTRYPOINT /usr/bin/snapserver --logging.sink=stdout
ENTRYPOINT ["/usr/bin/snapserver", "--logging.sink=stdout"]
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ COPY ./public ./public

RUN npm run build

FROM nginx:alpine

FROM nginx:alpine-slim
WORKDIR /app

COPY --from=build /app/build ./build
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ A UI built on [Snapcast](https://github.com/badaix/snapcast). I wasn't satisfied
### Framework
Built with [Reactjs](https://reactjs.org/). Static files served with nginx in container.

### Backend
Reaches out to the [Snapcast JSON RPC Api](https://github.com/badaix/snapcast/blob/master/doc/json_rpc_api/control.md) using a WebSocket. See `src/utils/WebSocket.js`. Events are handled via `src/utils/Reducer.js`.

### Testing Locally
Develop locally with Docker compose with snapcast client server built in.

Expand Down Expand Up @@ -53,8 +56,6 @@ ARG REACT_APP_THEME
## Useful Links

[Snapcast JSON RPC Api](https://github.com/badaix/snapcast/blob/master/doc/json_rpc_api/control.md)

[Component Library MatUI](https://mui.com/material-ui/react-button/)

[Loading Animations](https://cssloaders.github.io/)
Expand Down
3,512 changes: 2,012 additions & 1,500 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,18 @@
"@canvas-fonts/comic-sans-ms": "^1.0.4",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@fontsource/changa": "^4.5.10",
"@fontsource/changa": "^4.5.11",
"@fontsource/comic-neue": "^4.5.10",
"@fontsource/sansita": "^4.5.9",
"@fontsource/space-grotesk": "^4.5.10",
"@mui/material": "^5.11.1",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3",
"base-64": "^1.0.0",
"@fontsource/space-grotesk": "^4.5.13",
"@mui/material": "^5.11.8",
"date-fns": "^2.29.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
"react-scripts": "^5.0.1",
"sass": "^1.57.1",
"web-vitals": "^3.1.0"
"sass": "^1.58.0",
"web-vitals": "^3.1.1"
},
"scripts": {
"start": "react-scripts start",
Expand All @@ -48,5 +44,10 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^14.4.3"
}
}
4 changes: 2 additions & 2 deletions src/components/Stream/Stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { useContext } from 'react';
import { AppContext } from '../../utils/AppContext';
import PlayingLoader from '../PlayingLoader/PlayingLoader';
import './Stream.scss';
import base64 from 'base-64';

const SteamIcon = ({ artData }) => {
if (artData.extension === 'svg') {
const image = base64.decode(artData.data);

const image = atob(artData.data);
return <img
className='streamIcon'
alt='Steam Icon'
Expand Down

0 comments on commit a4748fc

Please sign in to comment.