This repository contains the source code for the Phenotypic Evolution Group Dockerfiles website. The website is built using Angular 18.2.2 and is hosted on GitHub Pages.
To build and run the website locally, ensure you have the following installed:
Follow these steps to set up the project:
- Clone the repository to your local machine.
- Run
npm install
to install the dependencies.
To start working on the website:
- Run
npm run dev
in your terminal. This command will launch a development server. - Open your browser and navigate to
http://localhost:4200/
to view the website.
The application will automatically reload if you make any changes to the source files.
To build the website for production, run ng build
. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
To deploy the website using Docker, go to the root directory of the project and follow these steps:
-
Build the Docker image.
To ensure the Docker build process fetches the latest changes from the repo and does not use any cached layers, use the
--no-cache
option.docker build --no-cache -t dockerfiles-website -f docker/git-clone-and-deploy/Dockerfile .
-
Run the Docker container.
docker run -d -p 80:80 -p 8080:8080 --name dockerfiles-website-container dockerfiles-website
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.