Skip to content

Commit

Permalink
[F] Setup GCS filesystem + datasets volume
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Mason committed Feb 12, 2024
1 parent 9e3cd77 commit f853af7
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/config/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
'@webroot' => dirname(__DIR__) . '/web',
'@webBaseUrl' => App::env('WEB_BASE_URL'),
'@previewUrlFormat' => App::env('ALIAS_PREVIEW_URL_FORMAT') . '&secret=' . App::env('NEXT_SECRET_TOKEN'),
'@assetsGeneralBaseURL' => sprintf(
'@gcsBucketBaseURL' => sprintf(
$gcsBucketPathFormat,
App::env('GCS_GENERAL_BUCKET')
App::env('GCS_BUCKET')
),
],

Expand Down
14 changes: 14 additions & 0 deletions api/config/project/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ email:
useAuthentication: '1'
username: $EMAIL_SMTP_USERNAME
transportType: craft\mail\transportadapters\Smtp
fs:
gcs:
hasUrls: true
name: GCS
settings:
bucket: $GCS_BUCKET
bucketSelectionMode: manual
expires: ''
keyFileContents: ''
projectId: $GCP_PROJECT_ID
subfolder: ''
type: craft\googlecloud\Fs
url: '@gcsBucketBaseURL'
meta:
__names__:
0d06751e-ecf9-4281-a754-8c818fb9353b: 'Color Filter Tool Block' # Color Filter Tool Block
Expand Down Expand Up @@ -102,6 +115,7 @@ meta:
6b8e1421-5b57-4c4d-bd1f-de5a2cd186e2: 'Filter Color Options' # Filter Color Options
6efbdc96-00f5-4e37-953b-d36344f6e1fb: 'Configured Widgets' # Configured Widgets
6f0c128e-9978-41c2-b982-dcdf3933b0e2: Homepage # Homepage
7a4c811e-eb74-4c4b-ae64-134f2a4e2c3e: Datasets # Datasets
7b30c218-6328-41a2-a3e3-2575559f4c9c: Table # Table
7bd60210-4767-46b3-b735-61a1499b90b7: 'Redirect Page' # Redirect Page
7c04d87d-2b5d-4ba8-841a-2d4f2a1047dd: 'Table Cell' # Table Cell
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
fieldLayouts:
c5474505-bbd8-451d-b7d8-9d8faead9de4:
tabs:
-
elementCondition: null
elements:
-
autocapitalize: true
autocomplete: false
autocorrect: true
class: null
disabled: false
elementCondition: null
id: null
inputType: null
instructions: null
label: null
max: null
min: null
name: null
orientation: null
placeholder: null
readonly: false
requirable: false
size: null
step: null
tip: null
title: null
type: craft\fieldlayoutelements\assets\AssetTitleField
uid: 51af6cd2-711f-4125-815b-6794088e6c70
userCondition: null
warning: null
width: 100
name: Content
uid: a6e1f9c8-0bc0-4fda-95cb-606f80bb1346
userCondition: null
fs: gcs
handle: datasets
name: Datasets
sortOrder: 1
titleTranslationKeyFormat: null
titleTranslationMethod: none
transformFs: ''
transformSubpath: ''
27 changes: 25 additions & 2 deletions docker-compose-local-db.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- ./api:/var/www/html
environment:
CRAFT_ENVIRONMENT: dev
SECURITY_KEY: biff
SECURITY_KEY: <SECURITY_KEY>
DB_DSN: pgsql:host=postgres;dbname=craft
DB_SERVER: postgres
DB_NAME: craft
Expand All @@ -30,7 +30,30 @@ services:
MEMCACHED_PORT: 11211
PORT: 8080
NEXT_API_BASE_URL: gateway.docker.internal:3000/api
NEXT_SECRET_TOKEN: super-secret-token
NEXT_SECRET_TOKEN: <NEXT_SECRET_TOKEN>
CANTO_APP_ID: <CANTO_APP_ID>
CANTO_SECRET_KEY: <CANTO_SECRET_KEY>
CANTO_AUTH_ENDPOINT: https://oauth.canto.com/oauth/api/oauth2/token?app_id={appId}&app_secret={secretKey}&grant_type=client_credentials&refresh_token=
CANTO_ASSET_ENDPOINT: https://rubin.canto.com/api/v1/image/
CANTO_ASSET_BASEURL: https://rubin.canto.com/direct/
GCP_PROJECT_ID: <GCP_PROJECT_ID>
GCS_BUCKET: <GCS_BUCKET>
VERIFY_EMAIL_PATH: http://localhost:3000/?activate=true
SET_PASSWORD_PATH: http://localhost:3000/?set_password=true
FACEBOOK_APP_ID: <FACEBOOK_APP_ID>
FACEBOOK_APP_SECRET: <FACEBOOK_APP_SECRET>
FACEBOOK_APP_REDIRECT_URL: http://localhost:3000/sso-redirect?sso=true&facebook=true
GOOGLE_APPLICATION_CREDENTIALS: <PATH_TO_GOOGLE_APPLICATION_CREDENTIALS>
GOOGLE_APP_ID: <GOOGLE_APP_ID>
EMAIL_FROM_ADDRESS: <EMAIL_FROM_ADDRESS>
EMAIL_REPLY_TO_ADDRESS: <EMAIL_REPLY_TO_ADDRESS>
EMAIL_SENDER_NAME: "Rubin Observatory Education and Public Outreach"
EMAIL_HTML_EMAIL_TEMPLATE: ""
EMAIL_SMTP_HOST_NAME: <EMAIL_SMTP_HOST_NAME>
EMAIL_SMTP_PORT: <EMAIL_SMTP_PORT>
EMAIL_SMTP_USERNAME: <EMAIL_SMTP_USERNAME>
EMAIL_SMTP_PASSWORD: <EMAIL_SMTP_PASSWORD>
CONTACT_FORM_NOTIFY_EMAIL: <CONTACT_FORM_NOTIFY_EMAIL>
ports:
- "8080:8080"
depends_on:
Expand Down

0 comments on commit f853af7

Please sign in to comment.