Fixed infinite data fetching bug on homescreen. Docker files
This commit is contained in:
parent
ff1d11f512
commit
ad5e7646c1
4 changed files with 37 additions and 2 deletions
24
Dockerfile.multiarch
Normal file
24
Dockerfile.multiarch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
FROM node:14-alpine
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN apk --no-cache --virtual build-dependencies add python make g++ \
|
||||||
|
&& npm install --production
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN mkdir -p ./public ./data \
|
||||||
|
&& cd ./client \
|
||||||
|
&& npm run build \
|
||||||
|
&& cd .. \
|
||||||
|
&& mv ./client/build/* ./public \
|
||||||
|
&& rm -rf ./client \
|
||||||
|
&& apk del build-dependencies
|
||||||
|
|
||||||
|
EXPOSE 5005
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
CMD ["node", "server.js"]
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
[![JS Badge](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://shields.io/)
|
[![JS Badge](https://img.shields.io/badge/JavaScript-F7DF1E?style=for-the-badge&logo=javascript&logoColor=black)](https://shields.io/)
|
||||||
[![TS Badge](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)](https://shields.io/)
|
[![TS Badge](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)](https://shields.io/)
|
||||||
|
[![Node Badge](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://shields.io/)
|
||||||
[![React Badge](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)](https://shields.io/)
|
[![React Badge](https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)](https://shields.io/)
|
||||||
|
|
||||||
![Homescreen screenshot](./github/_home.png)
|
![Homescreen screenshot](./github/_home.png)
|
||||||
|
|
|
@ -59,14 +59,14 @@ const Home = (props: ComponentProps): JSX.Element => {
|
||||||
if (apps.length === 0) {
|
if (apps.length === 0) {
|
||||||
getApps();
|
getApps();
|
||||||
}
|
}
|
||||||
}, [getApps, apps]);
|
}, [getApps]);
|
||||||
|
|
||||||
// Load bookmark categories
|
// Load bookmark categories
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (categories.length === 0) {
|
if (categories.length === 0) {
|
||||||
getCategories();
|
getCategories();
|
||||||
}
|
}
|
||||||
}, [getCategories, categories]);
|
}, [getCategories]);
|
||||||
|
|
||||||
// Refresh greeter and time
|
// Refresh greeter and time
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
flame:
|
||||||
|
image: pawelmalak/flame
|
||||||
|
container_name: flame
|
||||||
|
volumes:
|
||||||
|
- /path/to/data:/app/data
|
||||||
|
ports:
|
||||||
|
- 5005:5005
|
||||||
|
restart: unless-stopped
|
Loading…
Reference in a new issue