File tree 3 files changed +29
-3
lines changed 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 3
3
This repo contains materials for learning how to use infrastructure-as-code practices, including:
4
4
5
5
1 . An [ example Ruby on Rails app] ( /example-rails-app ) used for demonstration purposes.
6
- 2 . A [ Packer example] ( /packer-example ) that shows how to create an AMI that has Ruby on Rails installed and contains
6
+ 1 . A [ Packer example] ( /packer-example ) that shows how to create an AMI that has Ruby on Rails installed and contains
7
7
the code from the example Rails app.
8
- 3 . A [ basic Terraform example] ( /terraform-example-basic ) that shows an intro to Terraform.
9
- 4 . A [ full Terraform example] ( /terraform-example-full ) that shows more advanced Terraform usage, including how to take
8
+ 1 . A [ Docker example] ( /docker-example ) that shows how to create a Docker container that has Node.js installed and
9
+ runs a simple Node "Hello, World" web server.
10
+ 1 . A [ basic Terraform example] ( /terraform-example-basic ) that shows an intro to Terraform.
11
+ 1 . A [ full Terraform example] ( /terraform-example-full ) that shows more advanced Terraform usage, including how to take
10
12
the AMI created by the Packer example, deploy it on AWS, and run the example Rails app.
11
13
12
14
Note: all the code in this repo is used only for demonstration and teaching purposes and should not be used in
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:latest
2
+ MAINTAINER Yevgeniy Brikman <
[email protected] >
3
+
4
+ RUN apt-get update && apt-get install -y nodejs
5
+
6
+ RUN mkdir -p /usr/src/app
7
+ COPY ./src /usr/src/app
8
+ WORKDIR /usr/src/app
9
+
10
+ CMD ["nodejs" , "server.js" ]
Original file line number Diff line number Diff line change
1
+ var http = require ( 'http' ) ;
2
+
3
+ var server = http . createServer ( function ( request , response ) {
4
+ response . writeHead ( 200 , { "Content-Type" : "text/plain" } ) ;
5
+ response . end ( "Hello World!\n" ) ;
6
+ } ) ;
7
+
8
+ server . listen ( 8080 ) ;
9
+
10
+ console . log ( "Server running at http://127.0.0.1:8080/" ) ;
11
+
12
+ process . on ( 'SIGINT' , function ( ) {
13
+ process . exit ( ) ;
14
+ } ) ;
You can’t perform that action at this time.
0 commit comments