Fix prod nginx

This commit is contained in:
2023-09-20 14:46:35 +02:00
committed by Clément Le Bihan
parent ee8e0e26db
commit 7aa7f50ecb
8 changed files with 21 additions and 11 deletions

View File

@@ -8,6 +8,6 @@ insert_final_newline = true
indent_style = tab
indent_size = tab
[{*.yaml,*.yml}]
[{*.yaml,*.yml,*.nix}]
indent_style = space
indent_size = 2

View File

@@ -37,6 +37,7 @@ export class AuthService {
async sendVerifyMail(user: User) {
if (process.env.IGNORE_MAILS === "true") return;
console.log("Sending verification mail to", user.email);
const token = await this.jwtService.signAsync(
{
userId: user.id,

View File

@@ -1,4 +1,7 @@
node_modules/
.expo/
.idea/
.vscode/
.vscode/
.dockerignore
Dockerfile
Dockerfile.dev

View File

@@ -24,5 +24,3 @@ FROM nginx:1.21-alpine
COPY --from=build /app/web-build /usr/share/nginx/html
COPY ./assets/ /usr/share/nginx/html/assets/
COPY nginx.conf.template /etc/nginx/templates/default.conf.template
CMD nginx -g 'daemon off;'

View File

@@ -9,7 +9,6 @@ export const Metronome = ({ paused = false, bpm }: { paused?: boolean; bpm: numb
useEffect(() => {
if (paused) return;
const int = setInterval(() => {
console.log(enabled.current, volume.current);
if (!enabled.current) return;
if (!ref.current) ref.current = new Audio('/assets/metronome.mp3');
ref.current.volume = volume.current / 100;

View File

@@ -4,10 +4,6 @@ server {
index index.html;
location /assets {
alias ./assets;
}
location / {
try_files $uri $uri/ /index.html;
}

View File

@@ -62,7 +62,19 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => {
text: user.emailVerified ? 'verified' : 'not verified',
onPress: user.emailVerified
? undefined
: () => API.fetch({ route: '/auth/reverify', method: 'PUT' }),
: () =>
API.fetch({ route: '/auth/reverify', method: 'PUT' })
.then(() =>
Toast.show({
description: 'Verification mail sent',
})
)
.catch((e) => {
console.error(e);
Toast.show({
description: 'Verification mail send error',
});
}),
},
},
{

View File

@@ -5,9 +5,10 @@ pkgs.mkShell {
nodePackages.prisma
nodePackages."@nestjs/cli"
nodePackages.npm
eslint_d
nodejs_16
yarn
python3
(python3.withPackages (ps: with ps; [requests]))
pkg-config
];
shellHook = with pkgs; ''