Configuration of ECS with EC2 instances
This file contains hidden or 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
# Type queries into this side of the screen, and you will | |
# see intelligent typeaheads aware of the current GraphQL type schema, | |
# live syntax, and validation errors highlighted within the text. | |
# https://docs.github.com/en/graphql/overview/explorer | |
# We'll get you started with a simple query showing gists info! | |
query { | |
viewer { | |
gists (first: 100, orderBy: {field: CREATED_AT, direction: DESC} ) { |
If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.
Don't know how to create your own AWS ECS Cluster? Go here!
Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.
If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:
This file contains hidden or 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
package org.bouncycastle.openpgp.examples; | |
import org.bouncycastle.bcpg.ArmoredOutputStream; | |
import org.bouncycastle.bcpg.HashAlgorithmTags; | |
import org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; | |
import org.bouncycastle.jce.provider.BouncyCastleProvider; | |
import org.bouncycastle.openpgp.*; | |
import org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory; | |
import org.bouncycastle.openpgp.operator.PGPDigestCalculator; | |
import org.bouncycastle.openpgp.operator.PublicKeyDataDecryptorFactory; |
This file contains hidden or 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 glob | |
import os | |
from PIL import Image | |
def changeColotToGrayScale(): | |
os.makedirs('grayscale', exist_ok=True) | |
bmp_files = glob.glob('./*.png') |