Commit ad99b57f authored by Alexandros Georgantas's avatar Alexandros Georgantas

improvement(app): asset manager in wax

parent 49fe4340
......@@ -12,6 +12,8 @@ tmp/
uploads/*
yarn-error.log
data
database
storage
scripts/link.sh
epubcheck_data/*
epubcheck_log/*
......
......@@ -9,7 +9,6 @@ import createHistory from 'history/createBrowserHistory'
import { Root } from 'pubsweet-client'
// Modals
import AssetManager from '../../editoria/packages/asset-manager/src/ConnectedAssetManager'
import ModalProvider from 'editoria-common/src/ModalProvider'
import AddBookModal from 'pubsweet-component-editoria-dashboard/src/modals/AddBookModal'
import AddEndNoteModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/AddEndNoteModal'
......@@ -29,6 +28,7 @@ import UnlockedModal from 'pubsweet-component-wax/src/modals/UnlockedModal'
import CreateTemplateModal from 'pubsweet-component-editoria-templates/src/ui/src/modals/TemplateModal'
import UpdateTemplateModal from 'pubsweet-component-editoria-templates/src/ui/src/modals/ConnectedUpdateTemplateModal'
import DeleteTemplateModal from 'pubsweet-component-editoria-templates/src/ui/src/modals/DeleteTemplateModal'
import AssetManager from '../../editoria/packages/asset-manager/src/ConnectedAssetManager'
import theme from './theme'
......@@ -38,6 +38,7 @@ const history = createHistory()
const modals = {
addBook: AddBookModal,
assetManagerModal: AssetManager,
assetManagerEditor: AssetManager,
addEndNote: AddEndNoteModal,
deleteBook: DeleteBookModal,
archiveBook: ArchiveBookModal,
......
......@@ -10,11 +10,12 @@ module.exports = {
},
port: 'SERVER_PORT',
},
aws: {
accessKeyId: 'AWS_ACCESS_KEY_ID',
secretAccessKey: 'AWS_SECRET_ACCESS_KEY',
bucket: 'AWS_BUCKET',
region: 'AWS_REGION',
'file-server': {
accessKeyId: 'S3_ACCESS_KEY_ID_USER',
secretAccessKey: 'S3_SECRET_ACCESS_KEY_USER',
bucket: 'S3_BUCKET',
endpoint: 'S3_ENDPOINT',
port: 'S3_PORT',
},
'password-reset': {
url: 'PASSWORD_RESET_URL',
......
......@@ -87,3 +87,26 @@ services:
- POSTGRES_DB=test
- POSTGRES_USER=test
- POSTGRES_PASSWORD=pass
file_hosting:
image: minio/minio
ports:
- ${S3_PORT:-9000}:9000
volumes:
- ./storage/minio:/data
environment:
- MINIO_ACCESS_KEY=${S3_ACCESS_KEY_ID_ADMIN:-accessKey}
- MINIO_SECRET_KEY=${S3_SECRET_ACCESS_KEY_ADMIN:-secretKey}
command: server /data
createbucket:
image: minio/mc
depends_on:
- file_hosting
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add editoria http://file_hosting:9000 ${S3_ACCESS_KEY_ID_ADMIN:-admin} ${S3_SECRET_ACCESS_KEY_ADMIN:-adminSuperPassword};
/usr/bin/mc admin user add editoria/ ${S3_ACCESS_KEY_ID_USER:-editoria} ${S3_SECRET_ACCESS_KEY_USER:-editoriaSuperPassword};
/usr/bin/mc admin user enable editoria/ ${S3_ACCESS_KEY_ID_USER:-editoria};
/usr/bin/mc mb editoria/${S3_BUCKET:-uploads};
/usr/bin/mc admin policy set editoria/ readwrite user=${S3_ACCESS_KEY_ID_USER};
exit 0;
"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment