├── .gitmodules ├── .gitpod.Dockerfile ├── .gitpod.yml ├── README.md └── bin ├── init.sh └── start.sh /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "localstack"] 2 | path = localstack 3 | url = https://github.com/localstack/localstack.git 4 | [submodule "localstack-demo"] 5 | path = localstack-demo 6 | url = https://github.com/localstack/localstack-demo.git 7 | -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gitpod/workspace-full 2 | 3 | WORKDIR /usr/src/app 4 | 5 | # RUN pip install localstack awscli awscli-local 6 | 7 | ENV EXTRA_CORS_ALLOWED_ORIGINS '*' 8 | ENV DISABLE_CORS_CHECKS 1 9 | ENV DISABLE_CUSTOM_CORS_APIGATEWAY 1 10 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.Dockerfile 3 | 4 | tasks: 5 | - name: Initialise 6 | init: | 7 | bash ${GITPOD_REPO_ROOT}/bin/init.sh > /tmp/init.log 2>&1 8 | gp sync-done init 9 | 10 | - name: Run 11 | init: gp sync-await init 12 | command: bash ${GITPOD_REPO_ROOT}/bin/start.sh 13 | 14 | ports: 15 | - name: Web App 16 | description: The main application web server 17 | port: 3000 18 | onOpen: open-browser 19 | - port: 4526-4559 20 | onOpen: ignore 21 | 22 | github: 23 | prebuilds: 24 | # enable for the default branch 25 | master: true 26 | # enable for all branches in this repo 27 | branches: true 28 | # enable for pull requests coming from this repo 29 | pullRequests: true 30 | # enable for pull requests coming from forks 31 | pullRequestsFromForks: true 32 | # add a check to pull requests 33 | addCheck: true 34 | # add a "Review in Gitpod" button as a comment to pull requests 35 | addComment: false 36 | # add a "Review in Gitpod" button to the pull request's description 37 | addBadge: true 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LocalStack Gitpod Demo 2 | 3 | Simple demo for running LocalStack in Gitpod online IDE. 4 | 5 | Use this button to launch a Gitpod workspace with LocalStack: 6 | [![Open in Gitpod](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/whummer/localstack-gitpod-demo) 7 | 8 | ## Demo application 9 | 10 | The project comes with a simple demo application that can be deployed via the following commands: 11 | 12 | ``` 13 | cd localstack-demo 14 | make install 15 | make start 16 | ``` 17 | 18 | ## License 19 | 20 | The code in this project is available under the Apache 2.0 license. 21 | -------------------------------------------------------------------------------- /bin/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Pulling Docker images ..." 4 | docker pull localstack/localstack 5 | pip install localstack awscli awscli-local 6 | docker pull mlupin/docker-lambda:nodejs14.x & 7 | docker pull lambci/lambda:ruby2.7 & 8 | docker pull lambci/lambda:python3.7 & 9 | 10 | # start LocalStack container in the background 11 | echo "Starting LocalStack instance ..." 12 | DEBUG=1 localstack start -d 13 | 14 | # install demo 15 | echo "Install demo ..." 16 | cd localstack-demo 17 | make install 18 | 19 | echo "Done." 20 | -------------------------------------------------------------------------------- /bin/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # start LocalStack container in the background 4 | echo "Starting LocalStack instance ..." 5 | DEBUG=1 localstack start -d 6 | localstack logs -f & 7 | 8 | # start up demo app 9 | echo "Deploying and starting up demo app ..." 10 | cd localstack-demo && make start 11 | --------------------------------------------------------------------------------