App frontend to display timing information.
For development, we also need to install these tools:
- PHP 8.2
- Composer: https://getcomposer.org/
The containers need to be on the same network to connect to each other. Otherwise, the API REST won't be able to see the database.
docker network create lts-network
Build the container:
docker build --no-cache --tag lts-website ./dockerfiles/php
Run it:
docker run \
--name lts-website \
--network lts-network \
--mount type=bind,source="$(pwd)",target=/var/www/html \
-p 9000:9000 \
--env-file .env \
lts-website
Note: The container
lts-nginx-website
must be running before running this.
Build the container:
docker build --no-cache --tag lts-website-nginx ./dockerfiles/nginx
Run it:
docker run \
--name lts-website-nginx \
--network lts-network \
--mount type=bind,source="$(pwd)",target=/var/www/html \
-p 8091:80 \
--env-file .env \
lts-website-nginx
You can access to the main application by opening http://localhost:8000
.
Note: The ports depend on the settings of the file
.env
.