This project is an Angular-based frontend application that can be built and run using Docker. This guide will help you set up, build, and run the application in a Docker container.
- Docker installed on your machine
- Git installed on your machine
- Ansible installed on your machine
-
Clone the repository:
git clone https://github.com/noatgnu/curtain.git cd curtain
-
Build the Docker image:
You can customize the backend URL and ORCID APPID by passing them as build arguments. Replace
YOUR_BACKEND_URL
andYOUR_ORCID_TOKEN
with your own values.docker build --build-arg API_HOST=YOUR_BACKEND_URL --build-arg ORCID_APPID=YOUR_ORCID_APPID -t curtain-app .
Example:
docker build --build-arg API_HOST=https://example.com/ --build-arg ORCID_APPID=APP-EXAMPLE123 -t curtain-app .
-
Run the Docker container:
docker run -p 80:80 curtain-app
This will start the application and make it accessible at
http://localhost
.
-
Clone the repository:
git clone https://github.com/noatgnu/curtain.git cd curtain
-
Run the Ansible playbook:
Replace
[email protected]
andyour-domain.com
with your actual email and domain.ansible-playbook -i hosts ansible.playbook.yml --extra-vars "[email protected] domain=your-domain.com"
This playbook will:
- Install Docker and Docker Compose using their official installation scripts.
- Clone the repository.
- Set up necessary directories.
- Start Docker Compose.
- Obtain SSL certificates using Certbot.
The Dockerfile
is set up to:
- Use the
node:18-bullseye-slim
image as the base image. - Install necessary dependencies (
git
,nginx
). - Clone the repository.
- Replace the backend URL and ORCID token in the
environment.prod.ts
file with the provided build arguments. - Install Angular CLI and project dependencies.
- Build the Angular application.
- Use the
nginx:latest
image to serve the built application.
To customize the backend URL and ORCID token, you can edit the Dockerfile
directly or pass the values as build arguments as shown in the build step.
This project is licensed under the MIT License. See the LICENSE
file for more details.