This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"defaultConnection": "default", | |
"connections": { | |
"default": { | |
"connector": "bookshelf", | |
"settings": { | |
"client": "mysql", | |
"host": "${process.env.DB_HOST}", | |
"port": "${process.env.DB_PORT}", | |
"database": "${process.env.DB_NAME}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "bitbucket" { | |
username = var.bitbucket_username | |
password = var.bitbucket_password | |
} | |
resource "bitbucket_repository_variable" "gcloud_project_id" { | |
repository = "${var.bitbucket_username}/${var.bitbucket_repository_slug}" | |
key = "GCLOUD_PROJECT_ID" | |
value = google_project.project.project_id | |
secured = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "google" { | |
region = var.gcp_region | |
} | |
resource "random_id" "id" { | |
byte_length = 2 | |
prefix = "${replace(lower(var.gcp_project_name), "/\\s+/", "-")}-" | |
} | |
resource "google_project" "project" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
backend "gcs" { | |
bucket = "project-id-terraform-admin" | |
prefix = "terraform/state" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
google = { | |
source = "hashicorp/google" | |
version = ">= 3.50" | |
} | |
bitbucket = { | |
source = "terraform-providers/bitbucket" | |
version = ">= 1.2" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "gcp_project_name" { | |
type = string | |
description = "Name of the Google Cloud Platform Project to be created." | |
default = "next-strapi-cloud-run" | |
} | |
variable "gcp_region" { | |
type = string | |
description = "Google Cloud Region that the project should be created within" | |
default = "europe-west1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { request, gql } from 'graphql-request' | |
export const getStaticProps = async () => { | |
const query = gql` | |
{ | |
test { | |
title | |
} | |
} | |
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
CMS_GRAPHQL_URL: process.env.CMS_GRAPHQL_URL, | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
next-strapi-cloud-run-mysql: | |
image: mysql:5.7 | |
container_name: next-strapi-cloud-run-mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: cms | |
ports: | |
- "3308:3306" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
next-strapi-cloud-run-mysql: | |
image: mysql:5.7 | |
container_name: next-strapi-cloud-run-mysql | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: cms | |
ports: | |
- "3308:3306" |