Set variable with Project Web Interface
Alternatively, you can use the Project Web Interface to add the variable to the appropriate environment.
To add the remote storage variable using the Project Web Interface:
-
In the Project Web Interface, select the environment from the left.
-
Click the Configure environment icon.
-
In the Configure Environment view, click the Variables tab.
-
Click Add Variable.
-
In the Name field, enter
REMOTE_STORAGE
-
In the Value field, add the JSON configuration.
-
Select JSON value and Sensitive; deselect Inheritable by child environments.
-
Click Add Variable.
Use optional authentication
The key
and secret
are optional. When you create the variable, you can hide the key
and secret
by selecting the sensitive
option. With this setting, the values are not visible in the web interface. See Variable visibility in the Commerce on Cloud Infrastructure guide.
If you want to use an a different authentication method, omit the key
and secret
from the JSON configuration,. Configure the alternative authentication method, and verify that the server is authorized to the S3 bucket.
Sync the remote storage
After enabling the Remote Storage module, synchronize the current media files to the remote store location.
To start the synchronization:
-
Use SSH to log in to the remote environment with remote storage configured.
-
Start the sync.
bin/magento remote-storage:sync