*Tested on ubuntu 20.04
For the application to work, it is necessary to run dockerfile or docker-compose To run on the system, docker and docker-compose must be installed
1.install docker ubuntu
2.install docker-compose ubuntu
NOTE <EXAMPLE>
To be replaced with the appropriate values
exit 0
or exit status 0
In linux it means [OK]
any other number is an error
Build ./.env
the file from ./.env_example
[host]
###Sometimes it doesn't work for commands on the host add 'sudo' (sudo docker ....
) in front
###Paste your application in the /main
directory, server nginx will look for index.php
in the /main/public
directory
- terminal in host
docker-compose down
[host] - terminal in host
docker-compose up --build
. [host]
It works!
- list container
docker ps
(take the container id) [host] - insert the id of the container you want to use
docker exec -it <CONTAINER_ID> bash
[host] - terminal in container
cd /main
[docker] - terminal in container next
composer install -o
[docker] - terminal in container end
exit
out container terminal [docker]
docker-compose up --build
or faster docker-compose up
[host]
##NOTE
- in case of port conflicts, database name ... it is possible to change the value in the
./.env
file in the .env_example**_ file
NOTE: RUN docker ps
The list will include the port, e.g. 8070:8080 the first is the host port, e.g. http://localhost:8070
used in the browser should display a running application
app: http://localhost:<WEB_PORT_LOCAL>
database: localhost:<DB_PORT_LOCAL> user: <DB_USER>(test)
password:<DB_PASSWORD>(1234) database:<DB_NAME>(test)
NOTE: RUN docker ps
The list will include the port, e.g. 8070:8080 the first is the host port, e.g. http://localhost:8070
used in the browser should display a running application
app: http://localhost:<WEB_PORT_LOCAL>
database: localhost:<DB_PORT_LOCAL> user: <DB_USER>(test)
password:<DB_PASSWORD>(1234) database:<DB_NAME>(test)