mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Ok, works now.
This commit is contained in:
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM treeder/go-dind
|
||||
|
||||
RUN mkdir /app
|
||||
ADD app /app/gateway
|
||||
#ADD /home/treeder/.iron.json /app/iron.json
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT rc default && sleep 1 && ./gateway && sleep 1
|
||||
12
README.md
12
README.md
@@ -37,6 +37,7 @@ curl -i -X GET http://localhost:8080/sinatra?app=myapp
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Building/Testing
|
||||
|
||||
```sh
|
||||
@@ -46,6 +47,17 @@ docker run --rm -it --privileged --net=host -v "$PWD":/app -v $HOME:/root:ro -w
|
||||
|
||||
Then run the commands above to use it.
|
||||
|
||||
Build image:
|
||||
|
||||
```sh
|
||||
docker build -t iron/gateway:latest .
|
||||
```
|
||||
|
||||
Test it, the iron token and project id are for cache.
|
||||
|
||||
```sh
|
||||
docker run --rm -it --privileged --net=host -p 8080:8080 -e "IRON_TOKEN=GP8cqlKSrcpmqeR8x9WKD4qSAss" -e "IRON_PROJECT_ID=4fd2729368a0197d1102056b" -e "IRON_API_DEBUG=true" iron/gateway
|
||||
```
|
||||
|
||||
|
||||
# Previous version:
|
||||
|
||||
16
router.go
16
router.go
@@ -84,14 +84,14 @@ func main() {
|
||||
|
||||
// ironAuth = apiauth.New(config.Iron.AuthHost)
|
||||
|
||||
cacheConfigMap := map[string]interface{}{
|
||||
"token": config.Cache.Token,
|
||||
"project_id": config.Cache.ProjectId,
|
||||
}
|
||||
if config.Cache.Host != "" {
|
||||
cacheConfigMap["host"] = config.Cache.Host
|
||||
}
|
||||
icache.Settings.UseConfigMap(cacheConfigMap)
|
||||
// cacheConfigMap := map[string]interface{}{
|
||||
// "token": config.Cache.Token,
|
||||
// "project_id": config.Cache.ProjectId,
|
||||
// }
|
||||
// if config.Cache.Host != "" {
|
||||
// cacheConfigMap["host"] = config.Cache.Host
|
||||
// }
|
||||
// icache.Settings.UseConfigMap(cacheConfigMap)
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user