Create LXC Container as usual, but do not start it yet.
# Install NFS-Kernel on Host
apt install nfs-kernel-server| /** | |
| * Copyright (c) 2023-present, Bruno Carvalho de Araujo. | |
| * All rights reserved. | |
| * | |
| * This source code is licensed under the license found in the LICENSE file in | |
| * the root directory of this source tree. | |
| */ | |
| import { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils' | |
| import { defaultFieldResolver, type DocumentNode, type GraphQLSchema } from 'graphql' |
| #!/bin/bash | |
| git show :group_vars/all.yml | grep ^'$ANSIBLE_VAULT' | |
| export encrypted=$? | |
| if [ $encrypted -ne 0 ]; then | |
| echo Ansible Vault not encrypted, refusing to commit | |
| exit 1 | |
| fi |
| 0 0 * * * root docker rm $(docker ps -a -q) && docker rmi $(docker images -q -f dangling=true) | |
| 0 0 * * * root docker volume ls -qf dangling=true | xargs -r docker volume rm | |
| 0 0 * * * root docker system prune -a -f | |
| 0 0 * * * root docker builder prune --all --force --verbose |
| const { makeRemoteExecutableSchema, introspectSchema, mergeSchemas } = require('graphql-tools') | |
| const { createHttpLink } = require('apollo-link-http') | |
| const { setContext } = require('apollo-link-context') | |
| const { ApolloServer } = require('apollo-server-express') | |
| const fetch = require('node-fetch') | |
| const log4js = require('log4js') | |
| const logger = log4js.getLogger('server.js') | |
| logger.level = process.env.LOG_LEVEL || 'debug' | |
| const express = require('express') |
| const categories = useMemo(() => { | |
| return products.reduce((categories, { category }) => { | |
| return !category || categories.find(({ id }) => category && category.id === id) | |
| ? categories | |
| : [ | |
| ...categories, | |
| { | |
| id: category.id, | |
| value: category.id, | |
| label: category.title, |
| require('dd-trace').init({ | |
| hostname: process.env.DD_AGENT_HOST, | |
| port: 8126, | |
| env: 'development', | |
| logInjection: true, | |
| analytics: true, | |
| }); | |
| const { createLogger, format, transports } = require('winston'); | |
| const addAppNameFormat = format(info => { |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| // No Security | |
| { | |
| "rules": { | |
| ".read": true, | |
| ".write": true | |
| } | |
| } |
| { | |
| "chat": { | |
| // the list of chats may not be listed (no .read permissions here) | |
| // a chat conversation | |
| "$key": { | |
| // if the chat hasn't been created yet, we allow read so there is a way | |
| // to check this and create it; if it already exists, then authenticated | |
| // user (specified by auth.id) must be in $key/users |