====== Computational resources ====== {{page>header&nofooter}} This page describes the computational resources required for the development of the project. ===== Git for Version Control ===== Git is the version control system used in LBAW. Each group (gg) repository is at https://git.fe.up.pt/lbaw/lbaw2122/lbaw21gg. The teacher adds each student to the repository in the first class. Make sure you login in https://git.fe.up.pt/ before the first class, so that your account is created in the system. The repository's README file must include: * Group reference (lbaw21gg) * Project theme (e.g. "1. Collaborative news") * List of team members, including names and email addresses The group must ensure that the repository remains private, visible only by the team members and the teacher. [[https://git-scm.com/documentation|Git Documentation]] | [[https://git-scm.com/docs/user-manual.html|Git User Manual]] | [[https://git-scm.com/docs/gittutorial|A tutorial introduction to Git]] ===== PostgreSQL for Data Persistence ===== PostgreSQL is the database management system used in the course. A PostgreSQL production environment is available, which must be used in the application's production version. Each group (gg) will be provided with a PostgreSQL user account ''lbaw21gg'', with the group password, and a database ''lbaw21gg'' available on the production machine (''db.fe.up.pt''). This service is managed by UPdigital and **is only available using the VPN to FEUP**. To configure a connection to the database, use the following settings: **Host**: db.fe.up.pt\\ **Port**: 5432\\ **Database**: lbaw21gg\\ **Username**: lbaw21gg\\ **Password**: For development, groups can use a local PostgreSQL instance through Docker containers. Instructions can be found at: [[https://git.fe.up.pt/lbaw/template-postgresql]]. ==== About the PostgreSQL Production Environment ==== A PostgreSQL database contains one or more schemas, which in turn contains one or more tables. All databases contain a public schema, which is used as default. In PostgreSQL's command line interface, you can view the current active schema with: ''show search_path;'' To change the schema for the current session use: ''SET search_path TO ;'' In the PostgreSQL setup at FEUP (''db.fe.up.pt''), the public schema is shared between all accounts, i.e. tables created in the public schema are visible to all users (although not accessible). If you look at the tables in the publish schema, you will find a long list of tables. Thus, **it is important to not use the public schema** and instead create and use a schema with the name of your group (e.g. ''lbaw21gg''). To create this schema, use the following command: ''CREATE SCHEMA ;'' To always use this schema as the default in your project, add the following line to the beginning of your SQL scripts. ''SET search_path TO ;'' [[http://www.postgresql.org/docs/11/static/index.html|PostgreSQL 11 Documentation]] | [[https://www.pgadmin.org/|pgAdmin]] ===== Docker, Laravel and PostgreSQL for Application Deployment ===== Docker is used to deploy the application, both for the Vertical Prototype (A8) and the final product (A9). The group develops a web application using the Laravel server framework. The group starts the project by copying the files available at the template repository ([[https://git.fe.up.pt/lbaw/template-laravel]]) to their own repository, and then follow the instructions detailed in the README to set up the development requirements. The project uses the PostgreSQL database management system. A local instance is created using the bundled Docker compose file (see the README for the required steps to start it). The group should keep an up to date Docker image of their project in the group's container registry in GitLab (see the template README for the required steps). There is a practical guide available to help you build your prototype using the work done in the previous artefacts, namely A3, A6, and A7, see [[https://docs.google.com/document/d/e/2PACX-1vQpKviWFix7iauLA6Z2kKsZGMAzP-23G3Akbh4FCS2wlZgtCN0ycehk7VWUgwiRuxWmLiyJ_ZtUuJpQ/pub|LBAW A8: Putting it all together ]] [[https://laravel.com/docs/8.x/readme|Laravel documentation]] | [[https://docs.docker.com/get-started/|Docker documentation]] ===== Production Environment ===== The group should follow the instructions in the template-laravel README file to keep the project up to date on their production environment. Using the FEUP VPN, the project will be available at ''http://lbaw21gg.lbaw.fe.up.pt''. An update on the production environment is started 30 minutes after the last one completes. Note that updates might take some time, depending on the docker image sizes. {{page>footer&nofooter}}