initial import

This commit is contained in:
SourceFellows
2020-08-21 06:26:40 +02:00
commit e223458dd4
423 changed files with 9871 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

View File

@ -0,0 +1 @@
make: ./build.sh

View File

@ -0,0 +1,12 @@
FROM ubuntu
RUN apt-get update && apt-get install \
build-essential zlib1g-dev libssl-dev libncurses-dev \
libffi-dev libsqlite3-dev libreadline-dev libbz2-dev git curl wget -y
WORKDIR /opt/
RUN git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
RUN ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
ENV PATH="/root/.ebcli-virtual-env/executables:/root/.pyenv/versions/3.7.2/bin:$PATH"

View File

@ -0,0 +1 @@
web: application

View File

@ -0,0 +1,13 @@
Nutzer der EB-Cli über Docker-Container:
Image erstellen und ausführen:
```
docker build -t elasticbeanstalk-cli .
docker run -v `pwd`:/app -it elasticbeanstalk-cli /bin/bash
```
Innerhalb des Containers müssen folgende Kommandos ausgeführt werden:
```
eb init -p go go-beanstalk-sample --region eu-central-1
eb create go-env
```

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Build app
go build -o application

View File

@ -0,0 +1,3 @@
module golang.source-fellows.com/samples/cloud/beanstalk
go 1.14

View File

@ -0,0 +1,16 @@
package main
import (
"fmt"
"net/http"
"time"
)
func greet(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World! %s", time.Now())
}
func main() {
http.HandleFunc("/", greet)
http.ListenAndServe(":5000", nil)
}