If you want to use start APIIDA API Gateway Manager as a systemd-service, e.g. for autostart, you can create a systemd-service definition like following:
Create a new file in /etc/systemd/system/ and call it 'aagm.service'.
vi /etc/systemd/system/aagm.service
Include the following input (assuming, that you have your docker-compose.yml file inside /opt/aagm):
Code Block titlelanguage bash /etc/systemd/system/aagm.service
Code Block linenumberslanguage truebash [Unit] Description=Docker Compose container starter for APIIDA API Gateway Manager After=docker.service network-online.target Requires=docker.service network-online.target [Service] WorkingDirectory=/opt/aagm Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/docker-compose up -d ExecStop=/usr/local/bin/docker-compose down ExecReload=/usr/local/bin/docker-compose pull --quiet --parallel ExecReload=/usr/local/bin/docker-compose up -d [Install] WantedBy=multi-user.target
Now you can use the following commands to manage your APIIDA API Gateway instance:
Code Block | ||||
---|---|---|---|---|
| ||||
# Start APIIDA API Gateway Manager systemctl start aagm.service # Stop APIIDA API Gateway Manager systemctl stop aagm.service # Restart APIIDA API Gateway Manager systemclt restart aagm.service # Enable autostart for APIIDA API Gateway Manager systemctl enable aagm.service # Disable autostart for APIIDA API Gateway Manager systemctl disable aagm.service |
...