What is the correct workflow for standalone elastic agent on docker swarm?

I don't use fleet server, because I hope everything is up and running in production environment just as what I have configured in development environment. I don't think fleet server can do this. It seems I have to config everything through Kibana web ui again with fleet server. Please correct me if I'm wrong. Thank you.

I'm using docker swarm, I hope through several commands everything is up and running in production environment.

Following is what I do so far:
Use Kibana to generate agent policy and use them in production environment for elastic agent.

The problem is in production environment, integrations haven't been installed, so I have to install them through Kibana web ui one by one, which seems tedious. Is there a way to write this in Kinaba's configuration file? or at least, I can run some commands to make sure requried integrations' assets is installed?

Another problem is these assets also include index templates, if I run elastic agent first, then install integrations' assets later, would there be any problem? (I think index templates and mapping can't be created, if data is already sent to Elasticsearch)

Thank you so much for reading my post.