mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-09-19 02:24:54 +02:00
initial import
This commit is contained in:
5
cloud-provider/aws-beanstak-sample/.gitignore
vendored
Normal file
5
cloud-provider/aws-beanstak-sample/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
# Elastic Beanstalk Files
|
||||
.elasticbeanstalk/*
|
||||
!.elasticbeanstalk/*.cfg.yml
|
||||
!.elasticbeanstalk/*.global.yml
|
1
cloud-provider/aws-beanstak-sample/Buildfile
Normal file
1
cloud-provider/aws-beanstak-sample/Buildfile
Normal file
@ -0,0 +1 @@
|
||||
make: ./build.sh
|
12
cloud-provider/aws-beanstak-sample/Dockerfile
Normal file
12
cloud-provider/aws-beanstak-sample/Dockerfile
Normal 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"
|
1
cloud-provider/aws-beanstak-sample/Procfile
Normal file
1
cloud-provider/aws-beanstak-sample/Procfile
Normal file
@ -0,0 +1 @@
|
||||
web: application
|
13
cloud-provider/aws-beanstak-sample/README.txt
Normal file
13
cloud-provider/aws-beanstak-sample/README.txt
Normal 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
|
||||
```
|
4
cloud-provider/aws-beanstak-sample/build.sh
Executable file
4
cloud-provider/aws-beanstak-sample/build.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build app
|
||||
go build -o application
|
3
cloud-provider/aws-beanstak-sample/go.mod
Normal file
3
cloud-provider/aws-beanstak-sample/go.mod
Normal file
@ -0,0 +1,3 @@
|
||||
module golang.source-fellows.com/samples/cloud/beanstalk
|
||||
|
||||
go 1.14
|
16
cloud-provider/aws-beanstak-sample/main.go
Normal file
16
cloud-provider/aws-beanstak-sample/main.go
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user