mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 17:22:42 +02:00
Add Dockerfile
This commit is contained in:
parent
426d0b0335
commit
1a1bdfd674
6 changed files with 55 additions and 28 deletions
|
@ -1,5 +1,6 @@
|
|||
import Spotify from 'spotify-web-api-node';
|
||||
import makeDir from 'make-dir';
|
||||
import path from 'path';
|
||||
import container from './inversify.config';
|
||||
import {TYPES} from './types';
|
||||
import Bot from './bot';
|
||||
|
@ -16,6 +17,7 @@ const spotify = container.get<Spotify>(TYPES.Lib.Spotify);
|
|||
// Create data directories if necessary
|
||||
await makeDir(container.get(TYPES.Config.DATA_DIR));
|
||||
await makeDir(container.get(TYPES.Config.CACHE_DIR));
|
||||
await makeDir(path.join(container.get(TYPES.Config.CACHE_DIR), 'tmp'));
|
||||
|
||||
await sequelize.sync({});
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ export default class {
|
|||
}
|
||||
|
||||
private getCachedPathTemp(url: string): string {
|
||||
return path.join('/tmp', hasha(url));
|
||||
return path.join(this.cacheDir, 'tmp', hasha(url));
|
||||
}
|
||||
|
||||
private async isCached(url: string): Promise<boolean> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue