Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,21 @@ jobs:
with:
pass_on_octokit_error: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

localstack:
runs-on: ubuntu-latest
steps:
- name: Start LocalStack
run: |
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
docker pull localstack/localstack # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background

echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
- name: Run some Tests against LocalStack
run: |
awslocal s3 mb s3://test
awslocal s3 ls
echo "Test Execution complete!"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dist
coverage
node_modules
temp
volume

# Fixtures
fixtures/output/*
Expand Down
8 changes: 1 addition & 7 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
image:
file: .gitpod.Dockerfile

tasks:
- name: Install Dependencies
init: pnpm i --no-frozen-lockfile
file: docker/gitpod.Dockerfile

vscode:
extensions:
- aaron-bond.better-comments
- codecov.codecov
- davidanson.vscode-markdownlint
- eamodio.gitlens
- editorconfig.editorconfig
- esbenp.prettier-vscode
- folke.vscode-monorepo-workspace
- google.wireit
- foxundermoon.shell-format
- mintlify.document
- ms-playwright.playwright
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.2.0
18.12.0
3 changes: 3 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"autoload",
"autodocs",
"aquasecurity",
"awscli",
"awslocal",
"backreference",
"bierner",
"brotli",
Expand Down Expand Up @@ -74,6 +76,7 @@
"kohler",
"lcov",
"linebreak",
"localstack",
"lukeed",
"markdownlint",
"markdownlintignore",
Expand Down
46 changes: 46 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM alpine:latest

LABEL rjoydip.image.authors="Joydip Roy (rjoydip)"

ENV EXTRA_CORS_ALLOWED_ORIGINS '*'
ENV DISABLE_CORS_CHECKS 1
ENV DISABLE_CUSTOM_CORS_APIGATEWAY 1
ENV PYTHONUNBUFFERED=1

COPY .nvmrc /tmp/.nvmrc

RUN apk --no-cache update && \
apk --no-cache add bash curl && \
python3.8 --repository=http://dl-cdn.alpinelinux.org/alpine/v3.9/main
# ca-certificates openssl ncurses coreutils make gcc g++ iptables gcompat libstdc++ libgcc libgcc libffi-dev linux-headers grep util-linux binutils findutils

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash; \
echo 'source $HOME/.profile;' >> "$HOME"/.zshrc; \
echo 'export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release;' >>"$HOME"E/.profile; \
echo 'nvm_get_arch() { nvm_echo "x64-musl"; }' >> "$HOME"/.profile; \
NVM_DIR="$HOME/.nvm"; source "$HOME"/.nvm/nvm.sh; source "$HOME"/.profile; \
nvm install "$(cat /tmp/.nvmrc)" && npm install -g pnpm@latest

RUN apk --no-cache update && \
apk --no-cache add bash && \
apk --no-cache add openjdk8-jre && \
apk --no-cache add python python-dev libstdc++ openssl-dev linux-headers libffi-dev clang make g++ gcc curl groff less && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 --no-cache-dir install --upgrade pip wheel && \
pip3 --no-cache-dir install -U setuptools && \
pip3 --no-cache-dir install psutil awscli urllib3 python-coveralls cfn-lint==0.20.0 && \
rm -rf /var/cache/apk/*

RUN pip3 --no-cache-dir install localstack awscli awscli-local

WORKDIR /workspace/templ

COPY . .

RUN pnpm i --no-frozen-lockfile

HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -f http://localhost/ || exit 1

# USER gitpod
23 changes: 23 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "3.8"

services:
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
image: localstack/localstack
# build:
# context: .
# dockerfile: Dockerfile
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # External services port range
- "127.0.0.1:53:53" # DNS config
- "127.0.0.1:53:53/udp" # DNS config
- "127.0.0.1:443:443" # LocalStack HTTPS Gateway
environment:
- DEBUG=${DEBUG-}
- PERSISTENCE=${PERSISTENCE-}
- LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-}
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
13 changes: 3 additions & 10 deletions .gitpod.Dockerfile → docker/gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
FROM gitpod/workspace-full:2022-04-11-18-21-27
FROM gitpod/workspace-full

# Copy .nvmrc files
COPY .nvmrc /tmp/.nvmrc

# Set environment variables
ENV NVM_DIR $HOME/nvm
RUN mkdir -p $NVM_DIR

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

SHELL ["/bin/bash", "--login", "-c"]
# Install Node.js and PNPM
RUN source "$HOME/.nvm/nvm.sh" \
&& export NVM_DIR="$HOME/.nvm" \
&& [ -s "$NVM_DIR/nvm.sh" ] \
&& . "$NVM_DIR/nvm.sh" \
&& VERSION="$(cat /tmp/.nvmrc)" \
&& nvm install "$VERSION" \
&& nvm use "$VERSION" \
&& nvm install "$(cat /tmp/.nvmrc)" \
&& nvm use "$(cat /tmp/.nvmrc)" \
&& npm install -g pnpm@latest

# Set up the project
Expand Down