This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
## <1> The two properties that need to be set are `token` and `organization`. You can hardcode them right in | |
## this provider block (very unrecommended) but the better option is to set the `GITHUB_TOKEN` | |
## and `GITHUB_ORGANIZATION` environment variables. Terraform will see those and configure the provider with them. | |
### | |
provider "github" { } | |
### | |
## <2> This assigns a user to the organization. the `username` property should be their string username. | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Using the resource created in our previous example, do a conditional GET | |
# using the correct current ETag | |
curl -i -H "If-None-Match:2" localhost:8080/events/55555c2d4c6f98f355b003e | |
# Since the resource (and ETag) hasn't changed since our last interaction with | |
# its state, it only needs to send back a 304 with no response body | |
HTTP/1.1 304 Not Modified | |
Server: Apache-Coyote/1.1 | |
ETag: "2" | |
Last-Modified: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) POST a new Event to the server | |
curl -i -X POST -H "Content-Type:application/json" \ | |
-d '{"name":"Basilica Block Party", "description":"Test description"}' \ | |
http://localhost:8080/events | |
# 2) Notice that an ETag header is populated with the contents of the version field | |
# (starting at 0) | |
HTTP/1.1 201 Created | |
Server: Apache-Coyote/1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grails create-app grails-lattice-app | |
cd grails-lattice-app | |
# Run the app and make sure you get the stock welcome page | |
grails run-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ltc status grails-lattice-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ltc create grails-lattice-app {your-docker-hub-id}/grails-lattice-app:0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./gradlew build buildDocker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
... | |
dependencies { | |
... | |
classpath('se.transmode.gradle:gradle-docker:1.2') | |
} | |
} | |
group = {your-docker-hub-id} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir src/main/docker | |
vim src/main/docker/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:8 | |
VOLUME /tmp | |
ADD grails-lattice-app-0.1.jar app.jar | |
RUN bash -c 'touch /app.jar' | |
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] |
NewerOlder