Deploy Surgio & API Gateway with Docker & Docker Compose.
Clone this repository or just download the docker-compose.yml
file.
Create a config
folder in the directory where the docker-compose.yml
file is located.
Place your Surgio configuration file in the config
directory.
Normally, it would be surgio.conf.js
, provider
folder and template
folder.
Then run the following command to start the service.
docker-compose up -d
The configuration you provided will automatically be loaded into the container.
Access http://localhost:23000
, you should be able to see the welcome page of Surgio.
If you want to update your custom configuration, you can simply replace the configuration files in the config
folder.
Then run the following command to restart the service.
docker-compose restart
Then, you can access http://localhost:23000
to see the updated configuration.
By default, the port 23000
is exposed.
You can change this setting in the docker-compose.yml
file.
Change the ports
section to the port you want to expose. (the one in the front XD)
By default, artefacts are generated and updated every hour.
You can change this setting in the docker-compose.yml
file.
Change the AUTOGEN_INTERVAL
variable in the ENVIRONMENT
section to the desired time interval.
Change the environment
section to the time interval you want.
The format would be xh
for every x
hour, or xm
for every x
minute. Or you can combine them, like xhym
for every x
hour and y
minute.
For example, 1h30m
means update the artefacts every 1 hour and 30 minutes.
If you don't want to auto generate artefacts, you can just delete the AUTOGEN_INTERVAL
variable.
Each time the Surgio version is updated, the Docker image is automatically updated. (It may take up to a day to release.)