refact: removed s3 and added docker compose local storage env config
This commit is contained in:
parent
f5181cbe6e
commit
30b66fc7fe
@ -4,10 +4,7 @@ PAYLOAD_SECRET=YOUR_SECRET_HERE
|
||||
DOMAIN_NAME=localhost:3000
|
||||
PORT=3000
|
||||
|
||||
ACCESS_KEY_ID=
|
||||
SECRET_ACCESS_KEY=
|
||||
BUCKET_NAME=
|
||||
S3_ENDPOINT=
|
||||
MEDIA_VOLUME_PATH=
|
||||
|
||||
DEFAULT_EMAIL=
|
||||
SMTP_HOST=
|
||||
|
@ -1,16 +1,22 @@
|
||||
volumes:
|
||||
media:
|
||||
driver_opts:
|
||||
o: bind
|
||||
type: bind
|
||||
device: '${MEDIA_VOLUME_PATH}'
|
||||
node_modules:
|
||||
|
||||
services:
|
||||
payload:
|
||||
container_name: "midrashim"
|
||||
container_name: "ysandler-work"
|
||||
image: node:18-alpine
|
||||
ports:
|
||||
- '${PORT}:${PORT}'
|
||||
volumes:
|
||||
- .:/home/node/app
|
||||
- node_modules:/home/node/app/node_modules
|
||||
- media:/home/node/app/media
|
||||
working_dir: /home/node/app/
|
||||
command: sh -c "npm install && npm run build && npm start"
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
data:
|
||||
node_modules:
|
||||
|
@ -2,7 +2,6 @@ import { s3Storage } from '@payloadcms/storage-s3'
|
||||
import { nodemailerAdapter } from '@payloadcms/email-nodemailer'
|
||||
import { formBuilderPlugin } from '@payloadcms/plugin-form-builder'
|
||||
import { postgresAdapter } from '@payloadcms/db-postgres'
|
||||
import { payloadCloudPlugin } from '@payloadcms/payload-cloud'
|
||||
import path from 'path'
|
||||
import { buildConfig } from 'payload'
|
||||
import { fileURLToPath } from 'url'
|
||||
@ -64,22 +63,6 @@ export default buildConfig({
|
||||
|
||||
sharp,
|
||||
plugins: [
|
||||
payloadCloudPlugin(),
|
||||
s3Storage({
|
||||
collections: {
|
||||
media: true,
|
||||
},
|
||||
bucket: process.env.BUCKET_NAME || '',
|
||||
config: {
|
||||
credentials: {
|
||||
accessKeyId: process.env.ACCESS_KEY_ID || '',
|
||||
secretAccessKey: process.env.SECRET_ACCESS_KEY || '',
|
||||
},
|
||||
region: 'us-east-1',
|
||||
endpoint: process.env.S3_ENDPOINT,
|
||||
forcePathStyle: true,
|
||||
}
|
||||
}),
|
||||
formBuilderPlugin({
|
||||
fields: {
|
||||
text: true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user