Deploy EzyPlatform with Docker
Updated at 1721655982000Database Setup
According to the deployment model, the ezyplatform docker image will not contain a database, so you will need to use a server to host multiple databases.
You can create a database for each of your projects. For example, if your project is named "blog", you can create a database named blog
as follows:
CREATE SCHEMA `blog` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ;
Create the upload folder on Your Server
Let's say you are using the /opt
directory you can create the /opt/upload
folder to store uploaded files in the feature.
Create the setup.properties File on Your Server
Let's say you are using the /opt
directory to store configuration files. You can create a setup.properties
file in this directory with the following content:
datasource.jdbc_url=jdbc:mysql://database_server_ip:database_port/blog datasource.driver_class_name=com.mysql.cj.jdbc.Driver datasource.username=database_username datasource.password=database_password tables.create_manually=false
Where:
- blog: The name of the database for your project.
- database_server_ip: The IP address of the server hosting the
blog
database you just created. - database_port: The port that your database allows connections through.
- database_username: The username for accessing your
blog
database. - database_password: The password for accessing your
blog
database.
Make sure the configuration allows the ezyplatform container's IP to connect to the database using the provided username and password.
Launch ezyplatform
You can download the ezyplatform-only image with the following command:
docker pull youngmonkeys/ezyplatform-only
Next, you can launch the ezyplatform-only container with the command:
docker run --name=ezyplatform-only -p 9090:9090 -p 8080:8080 -p 18080:18080 -p 3005:3005 -p 2208:2208 -p 2611:2611/udp -v /opt/setup.properties:/app/ezyplatform/settings/setup.properties -v /opt/upload:/app/ezyplatform/upload -d youngmonkeys/ezyplatform-only:latest
Where:
- Ports 9090, 8080, and 18080 are for HTTP; you will need to mount these ports.
- Ports 3005, 2208, and 2611 are for socket connections. If your project does not need these, you can omit them.
/opt/setup.properties
: The file we created above.
After a successful launch, you can access http://server_ip:9090
. However, you might want to configure the load balancer before proceeding with the installation.
Configure Load Balancer
You can configure your load balancer to attach a domain name and SSL for your project, for example:
- https://yourdomain.com will point to http://server_ip:8080
- https://admin.yourdomain.com will point to http://server_ip:9090
Then you can proceed with the admin setup for ezyplatform just like the regular installation without Docker.