APIIDA API Gateway Manager

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

If you want to use 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):

    /etc/systemd/system/aagm.service
    [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:

# 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 
  • No labels