[Unit]
Description=OpenStack Image Service API server
After=syslog.target network.target
After=mariadb.service postgresql.service rabbitmq-server.service

[Service]
Type=simple
User=glance
Group=glance
LimitNOFILE=131072
LimitNPROC=131072
WorkingDirectory=/var/lib/glance
PrivateTmp=yes
# the connection parameter might be stored in the glance-api related config files
ExecStartPre=-/usr/bin/glance-manage --config-dir=/etc/glance/glance.conf.d/ --config-dir=/etc/glance/glance-api.conf.d/ db sync
ExecStart=/usr/bin/glance-api

[Install]
WantedBy=multi-user.target
