You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Built with [Jekyll](https://jekyllrb.com/). Use the [Jekyll Quick Start Guide](https://jekyllrb.com/docs/quickstart/) to install the requirements.
3
+
Built with [Jekyll](https://jekyllrb.com/).
4
4
5
5
## Setting up your environment
6
6
7
-
If you are doing this for the first time run these commands.
7
+
Before you can start working on this site, you need to set up your local development environment. We recommend running this site locally using Docker. If you haven't already, coordinate time with your supervisor or another full-timer to get Docker installed.
8
8
9
-
Running Jekyll natively on your machine is preferred, so try that option first.
9
+
### First Time Setup: Building the Docker Container
10
10
11
-
If your file permissions are being a pain, or you want to use the same environment that jenkins uses to deploy - we've included a dockerfile you can use to build a reliable Docker container that has ruby and all the gems you need.
12
-
13
-
### Using Docker
11
+
The first thing we need to do is build the Docker container for the site. This only needs to be done the first time you set up the site on a computer. If you change computers, you'll need to do this again.
*`--rm`: remove container intermediate containers created when building
22
20
*`-t ruby-tr-site-build-container`: tag the resulting image to make it easier to identify
23
21
*`.`: look in this directory for a dockerfile to use for building the image
24
22
25
-
### Just MacOS
26
-
27
-
Use homebrew to install ruby, though you may not need to depending on the version included in OSX.
28
-
29
-
`brew install ruby`
30
-
31
-
`gem install bundle`
32
-
33
-
... And finally in the root of this git project, run:
34
-
35
-
`bundle install`
36
-
37
-
## Run a local development server
23
+
### Running the Docker Container
38
24
39
-
Once you start the jekyll server, you can view the site at [http://localhost:4000](http://localhost:4000) or [http://127.0.0.1:4000](http://127.0.0.1:4000). It will rebuild every time you make a change.
40
-
41
-
Depending on your setup, the following instructions should get your dev server running.
42
-
43
-
### Docker
25
+
Any time you need to run the site locally to test your changes, navigate to the top directory of the project and run:
*`docker`: well, we're using the docker engine to do stuff
50
32
*`run`: this will start a container and execute a command we provide
@@ -55,35 +37,7 @@ Here's a breakdown of that command:
55
37
*`ruby-tr-site-build-container`: the docker image to execute our command in
56
38
*`bundle exec rake dev_docker`: the command being run inside the container (in this case our rake command)
57
39
58
-
### MacOS
59
-
60
-
Just `bundle exec rake dev`
61
-
62
-
## Build and Deploy
63
-
64
-
### Rake tasks
65
-
66
-
We've built a handful of rake tasks that are easy to use. Note that these are used on Jenkins to deploy the website, so adding post-processing to the build_for_deploy script is an option.
67
-
68
-
Run `rake -T` to list all available tasks
69
-
70
-
```bash
71
-
$ bundle exec rake -T
72
-
73
-
rake build_for_deploy # Build for deploy
74
-
rake deploy_production[bucket] # Publish website to S3
75
-
rake dev # build and watch for dev
76
-
rake invalidate_cdn_cache[cloudfront_distribution_id] # Clears cache from cloudfront
77
-
rake show_invalidations[cloudfront_distribution_id] # show cloudfront invalidations
78
-
```
79
-
80
-
### Docker
81
-
82
-
`docker run --rm -v "$(pwd)":/website ruby-tr-site-build-container bundle exec rake build_for_deploy`
83
-
84
-
### MacOS
85
-
86
-
`bundle exec rake build_for_deploy`
40
+
Once you start the Docker container, you can view the site at [http://localhost:4000](http://localhost:4000) or [http://127.0.0.1:4000](http://127.0.0.1:4000). It will rebuild every time you make a change.
87
41
88
42
## Adding a Bio
89
43
@@ -109,3 +63,44 @@ title: Techranger Lead Developer
109
63
date: 2025-11-28
110
64
---
111
65
```
66
+
67
+
## (Optional) Setting Up Your Local Jekyll Environment
68
+
69
+
If you'd like to try running the site using Jekyll's built-in webserver, follow these instructions:
70
+
71
+
1. Use homebrew to [install ruby](https://ucfcdl.github.io/techrangers-handbook/how-to/install-ruby.html).
72
+
2. In the root of this git project, run:
73
+
74
+
`bundle install`
75
+
76
+
3. To run the server, run:
77
+
78
+
`bundle exec rake dev`
79
+
80
+
4. View the site at [http://localhost:4000](http://localhost:4000) or [http://127.0.0.1:4000](http://127.0.0.1:4000).
81
+
82
+
## (Optional) Build and Deploy
83
+
84
+
We've built a handful of rake tasks that are easy to use. Note that these are used on Jenkins to deploy the website, so adding post-processing to the `build_for_deploy` script is an option.
85
+
86
+
Run `rake -T` to list all available tasks
87
+
88
+
```bash
89
+
$ bundle exec rake -T
90
+
91
+
rake build_for_deploy # Build for deploy
92
+
rake deploy_production[bucket] # Publish website to S3
93
+
rake dev # build and watch for dev
94
+
rake invalidate_cdn_cache[cloudfront_distribution_id] # Clears cache from cloudfront
95
+
rake show_invalidations[cloudfront_distribution_id] # show cloudfront invalidations
96
+
```
97
+
98
+
### Examples of running build_for_deploy
99
+
100
+
If you're using Docker:
101
+
102
+
`docker run --rm -v "$(pwd)":/website ruby-tr-site-build-container bundle exec rake build_for_deploy`
0 commit comments