Fix member list update cache error.

This commit is contained in:
ADAMJR 2022-12-07 20:05:12 +00:00
parent 051dff4f0e
commit 7ae6c7abd0
9 changed files with 50 additions and 26 deletions

View File

@ -5,15 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## v[0.3.0] The late winter update.
### Added ### Added
- Create, share, and customize themes. - Create, share, and customize themes.
### Changed ...More things will be listed here when I remember what I added, it's been a long time. The version number may not be accurate...
### Removed <!-- [unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...HEAD -->
[unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.0...HEAD [0.3.0]: https://github.com/accord-dot-app/app/compare/v0.3.0...HEAD
[1.0.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.3.0...v1.0.0

View File

@ -3,18 +3,18 @@ RUN addgroup app && adduser -SG app app
RUN mkdir /app && chown app:app /app RUN mkdir /app && chown app:app /app
USER app USER app
# WORKDIR /app/frontend WORKDIR /app/frontend
# COPY --chown=app:app ./frontend/package*.json ./ COPY --chown=app:app ./frontend/package*.json ./
# RUN ln -s ./frontend/src/types /app RUN ln -s ./frontend/src/types /app
# RUN npm i RUN npm i
WORKDIR /app/backend
COPY --chown=app:app ./backend/package*.json ./
RUN npm i
WORKDIR /app WORKDIR /app
COPY --chown=app:app . . COPY --chown=app:app . .
# WORKDIR /app/backend
# COPY --chown=app:app ./backend/package*.json ./
# RUN npm i
EXPOSE 3000 EXPOSE 3000
EXPOSE 4200 EXPOSE 4200
CMD ./bin/start-dev.sh CMD ./bin/start-dev.sh

11
Dockerfile.prod Normal file
View File

@ -0,0 +1,11 @@
FROM node:16-alpine3.14
RUN addgroup app && adduser -SG app app
RUN mkdir /app && chown app:app /app
USER app
WORKDIR /app
COPY --chown=app:app . .
EXPOSE 3000
EXPOSE 4200
CMD ./bin/start-prod.sh

5
bin/start-prod.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/sh
cd /app/backend && npm run start:prod &
cd /app/frontend && npm run start:prod
fg %1

View File

@ -6,18 +6,19 @@ services:
ports: [27017:27017] ports: [27017:27017]
volumes: [accord:/data/db] volumes: [accord:/data/db]
restart: unless-stopped restart: unless-stopped
backend: app:
container_name: accord_backend container_name: accord_app
depends_on: [database] depends_on: [database]
build: ./backend build:
ports: [3000:3000] context: ./
env_file: [./backend/.env] dockerfile: Dockerfile.prod
ports: [3000:3000, 4200:4200]
env_file: [./backend/.env, ./frontend/env/.env.dev]
volumes: volumes:
- ./backend/src:/app/src - ./backend/src:/app/backend/src
- ./backend/assets:/app/assets - ./backend/assets:/app/backend/assets
- ./backend/logs:/app/logs - ./backend/logs:/app/backend/logs
- ./backend/keys:/app/keys - ./frontend/src:/app/frontend/src
entrypoint: npm run start:prod
restart: unless-stopped restart: unless-stopped
volumes: volumes:
accord: accord:

View File

@ -2,4 +2,5 @@ PORT=4200
REACT_APP_API_URL="http://localhost:3000/v2" REACT_APP_API_URL="http://localhost:3000/v2"
REACT_APP_CDN_URL="http://localhost:3000/assets" REACT_APP_CDN_URL="http://localhost:3000/assets"
REACT_APP_REPO="https://github.com/accord-dot-app/app" REACT_APP_REPO="https://github.com/accord-dot-app/app"
REACT_APP_VERSION="v0.3.0"
REACT_APP_ROOT_API_URL="http://localhost:3000" REACT_APP_ROOT_API_URL="http://localhost:3000"

View File

@ -82,11 +82,12 @@ const HomePage: React.FunctionComponent = () => {
</section> </section>
<footer className="fixed bottom-0 w-full"> <footer className="fixed bottom-0 w-full">
{process.env.REACT_APP_VERSION && ( {process.env.REACT_APP_VERSION}
{/* {process.env.REACT_APP_VERSION && (
<a className="float-right normal mr-2" <a className="float-right normal mr-2"
href={`${process.env.REACT_APP_REPO}/commit/${process.env.REACT_APP_VERSION}`} href={`${process.env.REACT_APP_REPO}/commit/${process.env.REACT_APP_VERSION}`}
target="_blank">v{process.env.REACT_APP_VERSION.slice(0, 7)}</a> target="_blank">v{process.env.REACT_APP_VERSION.slice(0, 7)}</a>
)} )} */}
</footer> </footer>
</PageWrapper> </PageWrapper>
); );

View File

@ -3,7 +3,7 @@ import { createSlice } from '@reduxjs/toolkit';
const get = (key: keyof Store.AppState['config']) => const get = (key: keyof Store.AppState['config']) =>
JSON.parse(localStorage.getItem(`config.${key as string}`) as any); JSON.parse(localStorage.getItem(`config.${key as string}`) as any);
const set = (key: keyof Store.AppState['config'], value: any) => const set = (key: keyof Store.AppState['config'], value: any) =>
JSON.parse(localStorage.setItem(`config.${key as string}`, value) as any); localStorage.setItem(`config.${key as string}`, value);
const slice = createSlice({ const slice = createSlice({
name: 'config', name: 'config',

6
package-lock.json generated Normal file
View File

@ -0,0 +1,6 @@
{
"name": "accord",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}