Face is the main web application of Associació Valenciana pel Transport Públic (Valencian Association for Public Transport), a non-profit organization whose goal is to achieve the public transport that the Valencian society deserves.
It is made with Next.js —a React framework— and love. ❤
The project follows the default Next.js application structure with the following additions:
.dockerignore
,.env.example
,docker-compose.yml
,Dockerfile
andMakefile
contain the configuration and manifests that define the development and runtime environments with Docker and Docker Compose..github
holds the GitHub Actions CI/CD pipelines.
This software is distributed under the MIT license. Please read the software license and the graphic resources license for more information on the availability and distribution.
This project comes with a containerized environment that has everything necessary to work on any platform without having to install dependencies on the developers' machines.
TL;TR
make
Before starting using the project, make sure that the following dependencies are installed on the machine:
- Git.
- An OCI runtime, like Docker Desktop, Podman Desktop or OrbStack.
- Docker Compose.
It is necessary to install the latest versions before continuing. You may follow the previous links to read the installation instructions.
First, initialize the project and run the environment.
make
Then, download third-party dependencies.
make deps
You may stop the environment by running the following command.
make down
Commands must be run inside the containerized environment by starting a shell in the main container (make shell
).
Run the following command to start the development server:
make run
It may be consumed from http://localhost.
Note that Git is not available in the container, so you should use it from the host machine. It is strongly recommended to use a Git GUI (like VS Code's or Fork) instead of the command-line interface.
The deployment process is automated with GitHub Actions. When changes are incorporated into production (master
branch) or staging (develop
branch), an automatic deployment is made to the corresponding environment.
There are several common problems that can be easily solved. Here are their causes and solutions.
The Docker environment should work properly. Otherwise, it is possible to rebuild it by running the following command.
docker compose down
docker compose build --no-cache node
To start from scratch, you can remove all containers, images and volumes of your computer by running the following commands.
Note that all system containers, images and volumes will be deleted, not only those related to this project.
docker compose down
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker volume rm $(docker volume ls -f dangling=true -q)