zowyle
September 18, 2022, 11:35am
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)
September 18, 2022, 1:42pm
2
1 Like
Falco
(Falco)
September 19, 2022, 1:48pm
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 Like
zowyle
September 19, 2022, 10:27pm
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)
September 19, 2022, 10:42pm
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 Likes
zowyle
September 19, 2022, 11:51pm
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
September 20, 2022, 10:21pm
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)
September 21, 2022, 9:57am
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 Like
zowyle
September 22, 2022, 12:26am
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)
September 22, 2022, 12:53am
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 Like
zowyle
September 22, 2022, 1:18am
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
September 22, 2022, 1:27am
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