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
{{ message }}
Repository navigation
Commit a719986
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+27-26Lines changed: 27 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,39 +109,40 @@ Using Docker, you can have a complete, consistent development environment withou
109
109
110
110
Note that this takes up a significant amount of space on your machine. Make sure you have at least 5GB free.
111
111
112
-
#### Included files
112
+
#### Included Files
113
113
114
-
Two files are included that are used by Docker to configure the environment, build, and serve the site. These files are pre-configured, and you typically won't need to edit them:
114
+
Two files are included for Docker configuration:
115
115
116
-
* The `Dockerfile` contains instructions to set up the development environment.
116
+
-**`Dockerfile`**: Contains instructions for setting up the Docker environment.
117
+
-**`docker-compose.yml`**: Defines services for managing the application lifecycle:
118
+
-`app`: Keeps the container running indefinitely, useful for debugging or running arbitrary commands.
119
+
-`fetch-jar`: Automatically downloads the appropriate Processing.py JAR file for image generation.
120
+
-`build-site`: Builds the static site without images.
121
+
-`build-all`: Builds the static site including images.
122
+
-`serve`: Serves the generated site using Python's built-in HTTP server on port 8080.
117
123
118
-
* The `docker-compose.yml` file defines three services to manage the application lifecycle:
119
-
*`app`: A base service that keeps the container running indefinitely. It's useful for debugging or running arbitrary commands within the container.
120
-
*`build`: A service that runs the generator.py script to build the static site.
121
-
*`serve`: A service that serves the generated site using Python's built-in HTTP server.
4.Build the Docker Image: `docker build -t processing-py-site .` This command creates a Docker image named processing-py-site, based on the instructions in the `Dockerfile` present in the repository.
126
+
1.**Install Docker**:
127
+
- For Mac: [Docker for Mac](https://www.docker.com/docker-mac)
128
+
- For Windows: [Docker for Windows](https://www.docker.com/docker-windows)
129
+
- Ensure [Docker Desktop](https://www.docker.com/products/docker-desktop/) is installed and running.
130
+
2.**Prepare the Project**:
131
+
-Clone this repository and navigate into the project directory.
132
+
-Build the Docker image: `docker build -t processing-py-site .`. This command creates a Docker image named `processing-py-site`, based on the `Dockerfile`.
130
133
131
-
#### Step 2: Building the static site
134
+
#### Building the Static Site
132
135
133
-
To build the static site using Docker Compose, run the following command from the root of your project:
136
+
-**Fetch Processing.py JAR** (if needed):
137
+
- Run `docker-compose run --rm fetch-jar` to automatically download the correct Processing.py JAR file for your architecture.
138
+
-**Build the Site**:
139
+
- Execute `docker-compose run --rm build-all` to build the entire site, including images. Use `docker-compose run --rm build-site` to build without images.
140
+
- The `--rm` flag ensures the container is removed after completion.
134
141
135
-
`docker-compose run --rm build`
142
+
#### Serving the Site Locally
136
143
137
-
This command starts a Docker container using the configuration from the `build` service, which executes the `generator.py` script to generate the static site. The `--rm` flag ensures the container is removed after the script finishes.
138
-
139
-
#### Step 3: Serving the Site Locally
140
-
After building the site, you can serve it locally by running:
141
-
142
-
`docker-compose up serve`
143
-
144
-
This command starts a Docker container that serves the generated static site on port 8080, as specified in the `serve` service. You can view the site by navigating to `http://localhost:8080` in a web browser.
144
+
- Start the server with `docker-compose up serve`. This serves the site on `http://localhost:8080`.
145
+
- Access the site via your web browser.
145
146
146
147
## Troubleshooting
147
148
@@ -186,4 +187,4 @@ or could be improved, and if possible how.
0 commit comments