Angular Dashboard Deployment
Overview
This guide provides detailed instructions on deploying the static Somalia dashboard Angular website. The provided docker-compose.yml file includes a service for serving the Angular application using Nginx.
Docker Compose File
version: "3.8"
services:
somdash:
image: michameiu/somdash:v1.0.1
networks:
- ovencrypt
deploy:
replicas: 1
labels:
- "traefik.enable=true"
- "traefik.http.routers.somdash.rule=Host(`domain.com`) || Host(`dash.domain.com`)"
- "traefik.http.services.somdash.loadbalancer.server.port=80"
- "traefik.docker.network=ovencrypt"
networks:
ovencrypt:
external: true
attachable: true
Instructions
-
Prerequisites
- Ensure Docker and Docker Compose are installed.
- Configure Domains
- Initialize Docker Swarm if not initialized:
sh docker swarm init - Ensure the
ovencryptnetwork is created and attachable:sh docker network create --driver=overlay --attachable ovencrypt
-
Setup Environment Variables
- Ensure that the Traefik labels and network configurations are correct.
-
Deploy the Stack
- Navigate to the directory containing the
docker-compose.ymlfile. - Run the following command to deploy the stack:
sh docker stack deploy -c docker-compose.yml <stack_name>Replace<stack_name>with a suitable name for your stack.
- Navigate to the directory containing the
-
Verify Deployment
- Check the status of the services using:
sh docker stack services <stack_name> - Verify that the
somdashservice is running and properly configured.
- Check the status of the services using:
-
Access the Website
- The static Angular website should be accessible at
http://domain.comorhttp://dash.domain.com.
- The static Angular website should be accessible at
-
Logs and Debugging
- To view logs for the service, use:
sh docker service logs <stack_name>_somdashReplace<stack_name>with the name of your stack.
- To view logs for the service, use: