zowyle
2022 年 9 月 18 日午前 11:35
1
What could be the reasons for making this variable a limited list. For what?
irb(main):007:0> SiteSetting.s3_region='fr-par'
Traceback (most recent call last):
5: from (irb):7
4: from lib/site_setting_extension.rb:548:in `block in setup_methods'
3: from lib/site_setting_extension.rb:368:in `add_override!'
2: from lib/site_settings/type_supervisor.rb:149:in `to_db_value'
1: from lib/site_settings/type_supervisor.rb:207:in `validate_value'
Discourse::InvalidParameters (Invalid value `fr-par` for `s3_region`)
Scaleway has its own regions.
Falco
(Falco)
2022 年 9 月 18 日午後 1:42
2
「いいね!」 1
Falco
(Falco)
2022 年 9 月 19 日午後 1:48
4
Yes, I’m sure because I wrote the Scaleway guide at Configure an S3 compatible object storage provider for uploads and tested it working with a production install.
「いいね!」 1
zowyle
2022 年 9 月 19 日午後 10:27
5
Cool! Try it on 2.9.0.Beta9 Please explain why you can’t change the variable through the console?
Discourse::InvalidParameters (Invalid value fr-par
for s3_region
)
InvalidParameters
Understand? Invalid value fr-par
for s3_region
- Invalid Parameters! Ok?
Falco
(Falco)
2022 年 9 月 19 日午後 10:42
6
You shouldn’t change it on the console, because you should follow Configure an S3 compatible object storage provider for uploads and set it as environment variables
「いいね!」 2
zowyle
2022 年 9 月 19 日午後 11:51
7
You say strange things
I did this before posting here originally.
This does not work
I tried DIRECTLY through the console
This does not work
@Falco I will provide you with a bucket and an access token on Scaleway. I’ll create a server now and set up a forum there and give you access. If I succeed, I’ll apologize
zowyle
2022 年 9 月 20 日午後 10:21
8
In the middle of the day I will delete the server. Until then, access is maintained.
Obviously - the suggested settings do not work
pfaffman
(Jay Pfaffman)
2022 年 9 月 21 日午前 9:57
9
Just set the endpoint.
Using Scaleway s3-compatible object storage - #19 by Falco .
EDIT: Oh, somehow I’d missed the whole beginning of this topic. . .
Lots of other people have followed the guide and it does work.
「いいね!」 1
zowyle
2022 年 9 月 22 日午前 12:26
10
nano /var/discourse/containers/app.yml
DISCOURSE_S3_REGION: "fr-par"
DISCOURSE_S3_ACCESS_KEY_ID: "SCW*******WYCGN"
DISCOURSE_S3_SECRET_ACCESS_KEY: "***************"
DISCOURSE_BACKUP_LOCATION: "s3"
DISCOURSE_S3_BACKUP_BUCKET: "test-forum-falco-discourse-s3-region"
DISCOURSE_S3_ENDPOINT: "https://s3.fr-par.scw.cloud"
./launcher rebuild app
Removing old container
+ /usr/bin/docker rm app
app
+ /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=4 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_FORCE_HTTPS=true -e LC_ALL=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e DISCOURSE_S3_REGION=fr-par -e DISCOURSE_S3_ACCESS_KEY_ID=SCWDM************GN -e DISCOURSE_S3_SECRET_ACCESS_KEY=*********************** -e DISCOURSE_BACKUP_LOCATION=s3 -e DISCOURSE_S3_BACKUP_BUCKET=test-forum-falco-discourse-s3-region -e DISCOURSE_S3_ENDPOINT=https://s3.fr-par.scw.cloud -e DISCOURSE_HOSTNAME=********** -e DISCOURSE_DEVELOPER_EMAILS=***************** -e DISCOURSE_SMTP_ADDRESS=in-v3.mailjet.com -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=************************ -e DISCOURSE_SMTP_PASSWORD=**************************** -e DISCOURSE_NOTIFICATION_EMAIL=************************* -e LETSENCRYPT_ACCOUNT_EMAIL=me@example.com -h scw-jolly-merkle-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:53:96:b4:7e:e7 local_discourse/app /sbin/boot
e558fe6dbde62177ae4f4171fd1099f1844321c80f59cf4c3c0d4c56abfa9412
*** - secrets
./launcher enter app
rake site_settings:export
---
title: Discourse1
contact_email: *************************
default_dark_mode_color_scheme_id: '1'
invite_only: 'true'
login_required: 'true'
default_trust_level: '1'
allowed_iframes: https://www.google.com/maps/embed?|https://www.openstreetmap.org/export/embed.html?|https://calendar.google.com/calendar/embed?|https://codepen.io/|https://www.instagram.com|https://*************************/discobot/certificate.svg
default_email_digest_frequency: '1440'
It doesn’t work still
Falco
(Falco)
2022 年 9 月 22 日午前 12:53
11
The ENV variables set at the app.yaml won’t necessarily reflect on the rake site_settings:export
, no idea why did you assume that.
Now that it looks like you got all the ENV variables set per the guide at Configure an S3 compatible object storage provider for uploads , what happens when you try to upload a picture to a post? Anything interesting in the /logs
page?
「いいね!」 1
zowyle
2022 年 9 月 22 日午前 1:18
12
Hello.
Ок. Shouldn’t they be displayed in the forum settings too? You obviously have some interesting and special approach to programming. Shouldn’t they really be there?
zowyle
2022 年 9 月 22 日午前 1:27
13
Please excuse me. Now it works
Settings fields are missing in the web interface
site_settings:export - fields are missing
SiteSetting.s3_region=‘fr-par’ - Error “Invalid value fr-par
for s3_region
”
But
it works
I don’t understand why I decided that
Thank you. Sorry