Skip to content

at-cloud-pro/warehouse-app

Repository files navigation

Warehouse

Portal providing documents preview and files sharing in AT Cloud Platform.

Before you start

Host OS

This project is well tested on macOS Sonoma with Docker Desktop. Other platforms should work fine, but we do not provide support for them.

Git

To enhance security, we require you to configure your local development environment in the way we can recognise your identity. Please set up local git to add metadata on each push. You can do that by setting:

# replace <your name and surname> with your real name
git config user.name "<your name and surname>"

# replace <your email> with your real email that ends on @gi.org.pl
# if you don't have that email, contact administrator
git config user.email "<your email>"

# we usually recommend to sign off commits with SSH key you already have in your system
git config gpg.format ssh

# replace <path to your ssh key> with your real SSH public key
# example: ~/.ssh/id_ed25519.pub
git config user.signingkey <path to your ssh key>

You need to repeat these steps on each new machine you'll be using for development. Pull requests containing unsigned commits will not be possible to merge.

Development

This project use:

  • PHP 8.3
  • Symfony framework
  • Doctrine ORM
  • Twig with Bootstrap 5.3

as a leading software and DigitalOcean as a cloud provider. Locally, the environment is set up using Docker Compose.

Setting project up

To set up project easily, copy the local environment configuration:

ln -s ./docker/dev/compose.override.yaml .

Note for macOS (Apple Silicon CPUs) users

By default linux/amd64 image is built. Use .compose.override.yaml file and add there information below to build more optimized image version:

services:
 app:
   platform: linux/arm64
 #rest of the file

Then, run the docker compose to start the project:

docker compose up -d --build

It will build the project and run it in the background. To check if it's running correctly, visit your browser under http://localhost. To see the logs stream, run:

docker compose logs -f app

Running the project tips

Do not execute bin/console or any other commands regarding project from your host machine, use container shell instead. For example, to clear app cache, run:

docker compose exec app bin/console cache:clear

It will execute the bin/console cache:clear command in the container shell.

To shut down the containers run:

docker compose down

Testing

To run tests, execute the following commands:

# unit tests
docker compose exec app vendor/bin/phpunit

# e2e tests
docker compose exec app vendor/bin/phpunit --format progress

We use PHPUnit for unit tests and Behat for end-to-ends. Unit tests are stored in the test directory with the structure the same as the original code, while end-to-end tests are stored in the features directory.

Release & deploy

Before merging Pull Request to the main branch, make sure to bump the project version in the:

  • composer.json file, line 2
  • compose.yaml file, line 7
  • Dockerfile file, line 3

Not bumping the version will result in the release failure. There is a step in CI that will protect the main branch from being merged without bumping the version.

Release is the step where we:

  • a git tag to last commit in given PR is pushed
  • final, production Docker image is built
  • image is tagged with correct semver version
  • tagged image is pushed GitHub Image Repository

Deploy is a step, where the code is deployed to DigitalOcean.

Release and deploy is automatic in this project.

Changelog

This project is using semantic versioning and conventional commits. See dedicated GitHub releases list) for more information.

License

This project is owned by Oskar Barcz operating under brand AT Cloud, and it's not open source. Every usage outside dedicated URL (workspace.atcloud.pro) requires written consent from Oskar Barcz.

About

Portal providing documents preview and files sharing in AT Cloud Platform

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors