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
{"lastUpload":"2022-03-26T06:56:39.315Z","extensionVersion":"v3.4.3"} |
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 doc: https://www.terraform.io/docs/providers/kubernetes/r/deployment.html | |
resource "kubernetes_deployment" "app" { | |
metadata { | |
name = "my-postgres-deployment" | |
namespace = "my-postgres-namespace" | |
labels = { | |
app = "postgres" | |
} | |
} |
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
# the following config is based on digitalocean doc | |
# https://www.digitalocean.com/docs/kubernetes/how-to/add-volumes/ | |
# | |
# other cloud provider may have different convention, i.e., needing to create a `kubernetes_persistent_volume` before creating a claim | |
# | |
# | |
# tf doc: https://www.terraform.io/docs/providers/kubernetes/r/persistent_volume_claim.html | |
resource "kubernetes_persistent_volume_claim" "app_digitalocean_pvc" { | |
metadata { |
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
# TYPE DATABASE USER ADDRESS METHOD | |
# "local" is for Unix domain socket connections only | |
local all all trust | |
# IPv4 local connections: | |
host all all 0.0.0.0/32 trust | |
# IPv6 local connections: | |
host all all ::0/128 trust |
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
# CONNECTION | |
listen_addresses = '*' | |
# REPLICATION | |
wal_level = logical # minimal, archive, hot_standby, or logical (change requires restart) | |
max_wal_senders = 4 # max number of walsender processes (change requires restart) | |
#wal_keep_segments = 4 # in logfile segments, 16MB each; 0 disables | |
#wal_sender_timeout = 60s # in milliseconds; 0 disables | |
max_replication_slots = 4 # max number of replication slots (change requires restart) |
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
FROM postgres:11.5 | |
ENV PGDATA=$DATA_VOLUME_MOUNT/pgdata | |
COPY ./docker-entrypoint-initdb.d/. /docker-entrypoint-initdb.d/ | |
RUN mkdir $DATA_VOLUME_MOUNT | |
COPY pg_hba.conf $DATA_VOLUME_MOUNT/pg_hba.conf | |
COPY postgresql.conf.sample /usr/share/postgresql/postgresql.conf.sample |
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
... | |
resource "aws_security_group" "behind_alb_sg" { | |
name = "${var.project_name}_ec2_behind_alb" | |
description = "Protect EC2 instances from public traffic and set them behind Application Load Balancer." | |
vpc_id = "${var.vpc_id}" | |
ingress { | |
from_port = 0 | |
to_port = 0 | |
protocol = "-1" |
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
... | |
resource "aws_alb_target_group" "http" { | |
name = "${var.project_name}-alb-tg-http" | |
port = 80 | |
protocol = "HTTP" | |
vpc_id = "${var.vpc_id}" | |
health_check { |
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
FROM node:8-alpine | |
EXPOSE 3000 | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY . . | |
RUN npm i | |
CMD [ "node", "src/server.js" ] |
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
{% extends 'base/html5_base.html' %} | |
{% load staticfiles %} | |
{% block content %} | |
<md-content data-ng-controller="techChController"> | |
<md-card > | |
<md-card-content> | |
<a class="md-headline">Integer Sum from String</a><br> | |
<a> This page demostrates our solution to the task for the Academic Innovation Summer Internship Program.<br> | |
User will input some arbitrary text. If there is any number within the text, the numbers will be extracted and sum together.<br> |