Skip to content

Commit 7ba2276

Browse files
committed
Added platform.sh
1 parent e715d73 commit 7ba2276

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

docs/dam/integration_with_dxp.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Integrate DAM with your Ibexa DXP project to use an effective tool
55

66
# Integrate DAM with DXP
77

8-
DAM integration with [[= product_name =]] is dedicated to [[= product_name_base =]] users who want to use [[= product_name_base =]] as a data storage. It enables using assets repository stored in the DXP in the Actito platform to build and insert marketing assets into campaign emails.
8+
DAM integration with [[= product_name =]] is dedicated to [[= product_name_base =]] users who want to use [[= product_name_base =]] as a data storage. It enables using assets repository stored in the DXP in the platform to build and insert marketing assets into campaign emails.
99
For more information, see [Actito documentation](https://cdn3.actito.com/fe/actito-documentation/docs/Using_Assets_from_a_DAM/#connection-to-ibexa).
1010

1111
## Enable Elasticsearch or Solr
@@ -21,6 +21,39 @@ the following search engines on your server:
2121

2222
Next, enable 0Auth Server authentication. To do it, follow steps up to the [Client section](oauth_server.md).
2323

24+
## Integration with Platform.sh
25+
26+
If you have your [[= product_name =]] project deplyed on Platform.sh, the following steps are required:
27+
28+
In the `.env` file, set paths to OAuth Server.
29+
Next, generate these keys and add them.
30+
31+
```bash
32+
Platform.sh
33+
34+
.platform.app.yaml
35+
36+
variables:
37+
env:
38+
# OAuth2 Server paths to certificates
39+
OAUTH2_PRIVATE_KEY_PATH: /app/oauth-server.key
40+
OAUTH2_PUBLIC_KEY_PATH: /app/oauth-server.pub
41+
42+
43+
hooks:
44+
build: |
45+
# Generate OAuth2 Keys
46+
openssl genrsa -out private.key 2048
47+
openssl rsa -in private.key -pubout -out public.key
48+
49+
# OAuth2 Server credentials
50+
export OAUTH2_PRIVATE_KEY="$(cat private.key | base64)"
51+
export OAUTH2_PUBLIC_KEY="$(cat public.key | base64)"
52+
53+
echo "$OAUTH2_PRIVATE_KEY" | base64 -d > ~/oauth-server.key
54+
echo "$OAUTH2_PUBLIC_KEY" | base64 -d > ~/oauth-server.pub
55+
```
56+
2457
## Install DAM package
2558

2659
Install dedicated DAM `ibexa/dam-user` package into your [[= product_name =]] instance.
@@ -149,9 +182,9 @@ nelmio_cors:
149182
allow_headers: ['Content-Type', 'Authorization', 'X-HTTP-Method-Override']
150183
```
151184
152-
Next, in the `.env` file provide path with a regular expression and change the domain to yours:
185+
Next, in the `.env` file provide path with a regular expression and change the domain accroding to your needs:
153186

154-
`CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1|(.+\.yourdomain\.(com|eu)))?(:[0-9]+)?$'`
187+
`CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1|(.+\.acme\.(com|eu)))?(:[0-9]+)?$'`
155188

156189

157190
### Override `nelmio` settings

0 commit comments

Comments
 (0)