This project serves as a preparation for the Best Hacking League hackathon.
- Install Docker
- Clone backend and frontend
repositories as subdirectories of this directory. The directory tree should look like this:
docker-config ├───backend ├───frontend ├───nginx-config └───docker-compose.yml - Execute:
while in the docker-config directory. This command will build any missing images and run all the containers.
$ docker-compose up -d - Access the application at http://localhost:4200. The /api/ URL prefix redirect the request to the backend server stripping the /api prefix in the meantime.
As service name you should use:
- backend
- frontend
- app (for the nginx reverse proxy, shows all the traffic that gets to the server)
- database
-
docker-compose up -d- starts all the containers in daemon mode (in the background). -
docker-compose down- stops all the containers. -
docker-compose logs [service]- shows the logs from all the containers. You may alternatively input the service name to see logs only from that service, this is optional. -
docker ps- shows running containers. -
docker-compose exec [service] [command]- run a command inside a docker container.docker-compose exec [service] bashgives you shell access to that container. -
docker-compose build [service]- (re)builds the specified service's image (or images for all the services). Useful if you introduced any changes to files referenced in Dockerfile or to the Dockerfile itself.IMPORTANT! Generally you want to use
buildafter changing the requirements.txt file (for backend), because it means that new libraries should be downloaded.
See database-diagram.png.
- Docker
- GraphQL
- Angular
- Python
- MongoDB
- Progressive Web Apps