Compile
[[toc]]
Regular compilation
Static compilation
The package by regular compilation also needs to rely on the support of the deployment environment, the statically compiled files can be freely put to run on the specified platform without environment configuration.
Cross compile
Compilation is differentiated by platform, you need to select a matching compilation method according to the deployment situation.
Docker
Goravel has a default Dockerfile
and docker-compose.yml
file, you can use it directly, note that APP_HOST
should be 0.0.0.0
at this time.
Docker Compose
You can also quickly start the service with the following command:
Note: If you need external access, you need to change APP_HOST to 0.0.0.0
Reduce package size
Commenting out the unused ServiceProvider
in ServiceProviders
will effectively reduce the packaging volume.
Last updated