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_style = tab
indent_size = tab indent_size = tab
[{*.yaml,*.yml}] [{*.yaml,*.yml,*.nix}]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

View File

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

View File

@@ -1,4 +1,7 @@
node_modules/ node_modules/
.expo/ .expo/
.idea/ .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 --from=build /app/web-build /usr/share/nginx/html
COPY ./assets/ /usr/share/nginx/html/assets/ COPY ./assets/ /usr/share/nginx/html/assets/
COPY nginx.conf.template /etc/nginx/templates/default.conf.template 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(() => { useEffect(() => {
if (paused) return; if (paused) return;
const int = setInterval(() => { const int = setInterval(() => {
console.log(enabled.current, volume.current);
if (!enabled.current) return; if (!enabled.current) return;
if (!ref.current) ref.current = new Audio('/assets/metronome.mp3'); if (!ref.current) ref.current = new Audio('/assets/metronome.mp3');
ref.current.volume = volume.current / 100; ref.current.volume = volume.current / 100;

View File

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

View File

@@ -62,7 +62,19 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => {
text: user.emailVerified ? 'verified' : 'not verified', text: user.emailVerified ? 'verified' : 'not verified',
onPress: user.emailVerified onPress: user.emailVerified
? undefined ? 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.prisma
nodePackages."@nestjs/cli" nodePackages."@nestjs/cli"
nodePackages.npm nodePackages.npm
eslint_d
nodejs_16 nodejs_16
yarn yarn
python3 (python3.withPackages (ps: with ps; [requests]))
pkg-config pkg-config
]; ];
shellHook = with pkgs; '' shellHook = with pkgs; ''