ACM's Website Mono-Repository. Inside contains submodules for all micro-frontend and micro-backend apis
-
Docker version
$ docker -v Docker version 19.03.8, build afacb8b
-
Docker Compose version
$ docker-compose -v docker-compose version 1.25.4, build 8d51620a
git submodule init
git submodule update
- The whole project runs on multiple docker containers on a shared network. You can find all off the development yaml files in the root of this repository.
docker-compose.web-lite.yml
A simple container meant to only load the chapter-website, the catch is the environment configuration. Which runs the site in production mode.
docker-compose.web-full.yml
Contains
- Chapter Website, ACM UCM's main website written in Angular 9 on the Ivy Framework with NgRx for state management
- Half-Dome, Backend Server written in Nodejs with Express to handle all requests related to information of our members
- Cathedral, Backend Server written in Python with Flask to handle all requests related to information of our projects
- Tenaya, Backend Server written in Go with the GoFiber Framework to handle all requests related to information of our events
- Tuolomne, Backend Server written in PHP with the Laravel Framework to handle all requests related to information of our workshops
- Mariposa, Backend Server written in Java with the Maven Framework to handle all requests related to information of our LAN parties
docker-compose.elk-lite.yml
Contains
docker-compose.elk-lite.yml
Contains
docker-compose.grafana.yml
Contains
Below is a list of possible combinations to run the ACM Website locally
- Run the root yaml compose file
docker-compose -p "ACM Chapter Website" -f docker-compose.web-full.yml up -d
- To create all tables to store data on run the bash script with this command
chmod +x database_setup.sh && ./database_setup.sh
Note: When running the project this way all applications opens on
http://localhost:<portNumber>
To check if they are setup correctly:
-
Docker Compose
$ docker-compose ps Name Command State Ports --------------------------------------------------------------------------------- Chapter-Website docker-entrypoint.sh yarn ... Up 0.0.0.0:4200->4200/tcp Half-Dome docker-entrypoint.sh yarn ... Up 0.0.0.0:4201->4201/tcp Tuolumne docker-php-entrypoint php ... Up 0.0.0.0:4202->4202/tcp Tenaya go run main.go Up 0.0.0.0:4203->4203/tcp pgadmin /entrypoint.sh Up 443/tcp, 0.0.0.0:8080->80/tcp postgres docker-entrypoint.sh postgres Up 0.0.0.0:35432->5432/tcp
-
Docker
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES bcdd8cab6353 chapter-website:v0.1 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 0.0.0.0:4200->4200/tcp Chapter-Website 36a54a443c24 half-dome:v1.1 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 0.0.0.0:4201->4201/tcp Half-Dome 29ace3f0ea26 tuolumne:v1.0 "docker-php-entrypoi…" 3 minutes ago Up 3 minutes 0.0.0.0:4202->4202/tcp Tuolumne f970a1f44851 tenaya:v1.0 "go run main.go" 3 minutes ago Up 3 minutes 0.0.0.0:4203->4203/tcp Tenaya 2b7e5a24c88a dpage/pgadmin4 "/entrypoint.sh" 3 minutes ago Up 3 minutes 443/tcp, 0.0.0.0:8080->80/tcp pgadmin 2d3f4c37df54 postgres:12.2-alpine "docker-entrypoint.s…" 3 minutes ago Up 3 minutes 0.0.0.0:35432->5432/tcp postgres
-
Recreate Containers
$ docker-compose -f docker-compose.web-full.yml up -d --force-recreate Recreating pgadmin ... done Recreating postgres ... done Recreating Half-Dome ... done Recreating Tuolumne ... done Recreating Tenaya ... done Recreating Chapter-Website ... done Attaching to pgadmin, postgres, Half-Dome, Toulumne, Tenaya, Chapter-Website ...
-
Rebuild Containers
$ docker-compose -f docker-compose.web-full.yml up -d --build Building half-dome ... Successfully built ce4b7e44d100 Successfully tagged docker_half-dome:latest Building chapter-website ... Successfully built 6955801be2ec Successfully tagged docker_chapter-website:latest Starting postgres ... done Recreating Half-Dome ... done Recreating Chapter-Website ... done Attaching to postgres, Half-Dome, Chapter-Website
Rebuilding a specific container:
docker-compose -p "ACM Chapter Website" up -d --build --no-deps <service-name>
Reinstalling dependencies of a specific container:docker-compose -p "ACM Chapter Website" up -d --build --no-deps --force-recreate <service-name>
-
netstat
$ netstat -lna | grep '4200\|4201\|4202\|4203\|8080\|35432' tcp46 0 0 *.4200 *.* LISTEN tcp46 0 0 *.4201 *.* LISTEN tcp46 0 0 *.4202 *.* LISTEN tcp46 0 0 *.4203 *.* LISTEN tcp46 0 0 *.8080 *.* LISTEN tcp46 0 0 *.35432 *.* LISTEN
Run docker exec -it postgres psql -U docker acm
after you have started up any of the compose files to sift through the database.
Open localhost:8080
and punch in the email and password
Note: if running this locally the default email is [email protected] and the default password is PgAdmin2020!
$ docker system prune --volumes
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all volumes not used by at least one container
- all dangling images
- all dangling build cache
Are you sure you want to continue? [y/N] y
...
Total reclaimed space: __GB