Skip to content

Instantly share code, notes, and snippets.

View kuccello's full-sized avatar

Kristan Krispy Uccello kuccello

View GitHub Profile
server.host: "0.0.0.0"
server.shutdownTimeout: "5s"
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
enterpriseSearch.host: 'http://enterprisesearch:3002'
# Password for the 'elastic' user (at least 6 characters)
ELASTIC_PASSWORD=<REDACTED set your own value>
# Password for the 'kibana_system' user (at least 6 characters)
KIBANA_PASSWORD=<REDACTED set your own value>
# Version of Elastic products
STACK_VERSION=8.2.3
# Set the cluster name
CLUSTER_NAME=docker-cluster
# Set to 'basic' or 'trial' to automatically start the 30-day trial
LICENSE=basic
version: "2.2"
services:
setup:
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
volumes:
- certs:/usr/share/elasticsearch/config/certs
user: "0"
command: >
bash -c '
// pages/post/[slug].tsx
// COPIED DIRECTLY FROM: https://keystonejs.com/docs/walkthroughs/embedded-mode-with-sqlite-nextjs
import { GetStaticPathsResult, GetStaticPropsContext, InferGetStaticPropsType } from 'next';
import Link from 'next/link';
import { query } from '.keystone/api';
import { Lists } from '.keystone/types';
type Post = {
// pages/index.tsx
// COPIED DIRECTLY FROM: https://keystonejs.com/docs/walkthroughs/embedded-mode-with-sqlite-nextjs
import { InferGetStaticPropsType } from 'next';
import Link from 'next/link';
// Import the generated Lists API and types from Keystone
import { query } from '.keystone/api';
import { Lists } from '.keystone/types';
{
"root": "apps/ksexample",
"sourceRoot": "apps/ksexample",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/next:build",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
"options": {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const withNx = require('@nrwl/next/plugins/with-nx');
const { withKeystone } = require("@keystone-6/core/next");
/**
* @type {import('@nrwl/next/plugins/with-nx').WithNxOptions}
**/
const nextConfig = {
nx: {
// Set this to true if you would like to to use SVGR
{
"name": "ksexmple",
"version": "1.0.0",
"private": true,
"scripts": {
"postinstall": "keystone postinstall"
},
"dependencies": {
"@keystone-6/auth": "^1.0.1",
"@keystone-6/core": "^1.0.1",
import { config, list } from '@keystone-6/core';
import { text } from '@keystone-6/core/fields';
import { Lists } from '.keystone/types';
const Post: Lists.Post = list({
fields: {
title: text({ validation: { isRequired: true } }),
slug: text({ isIndexed: 'unique', isFilterable: true }),
content: text(),
},
docker run \
 -name local-app-postgres \
 -e POSTGRES_PASSWORD=sup3rs3cr3t \
 -e POSTGRES_USER=app_admin \
 -e POSTGRES_DB=app_db \
 -e PGDATA=/var/lib/postgresql/data/pgdata \
 -v $HOME/dev-volumes/app-db:/var/lib/postgresql/data \
 -p 11032:5432 \
 -d postgres:12.5-alpine