-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #271 from kchason/local-docker-development
Local Docker Build
- Loading branch information
Showing
6 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM --platform=linux/amd64 ruby:3.1-bullseye | ||
|
||
# Define the working directory | ||
WORKDIR /usr/app/src | ||
|
||
# Copy the Gemfile and Gemfile.lock | ||
COPY Gemfile Gemfile.lock ./ | ||
|
||
# Install dependencies | ||
RUN gem install jekyll bundler &&\ | ||
bundle install | ||
|
||
# Expose port 4000 and the 35729 for livereload | ||
EXPOSE 4000 | ||
EXPOSE 35729 | ||
|
||
# Start the application | ||
CMD ["bundle", "exec", "jekyll", "serve", "--livereload", "--host", "0.0.0.0"] |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
## Official repo of the CASE Ontology Website | ||
## Official Repository of the CASE Ontology Website | ||
|
||
This repository serves the website for https://caseontology.org. | ||
|
||
To report an issue with or make suggestions for the website, please visit the [CASE Community Help Center](https://case.atlassian.net/servicedesk). | ||
|
||
If you are interested in contributing to the website and require a local environment for testing modifications, see [CONTRIBUTE.md](https://github.com/casework/casework.github.io/blob/master/CONTRIBUTE.md). | ||
|
||
### Local Development | ||
|
||
This repository is configured with a Docker Compose file to allow for local development. To run the website locally, you will need to install [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). | ||
|
||
Once Docker and Docker Compose are installed, you can run the following command to start the website locally: | ||
|
||
```bash | ||
docker-compose up -d --build | ||
``` | ||
|
||
The website will be available at http://localhost:4000 and should automatically reload when changes are made to the source files as it is running in watch mode. | ||
|
||
To stop the website, run the following command: | ||
|
||
```bash | ||
docker-compose down | ||
``` | ||
|
||
To troubleshoot the website, you can view the logs with the following command: | ||
|
||
```bash | ||
docker logs jekyll | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.8' | ||
|
||
services: | ||
jekyll: | ||
container_name: jekyll | ||
build: . | ||
ports: | ||
- "4000:4000" | ||
- "35729:35729" | ||
volumes: | ||
- .:/usr/app/src/ |