Skip to content

Configuration ​

Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we highly recommend scanning the services documentation to get a good handle on how the magicks work.

Also note that options, in addition to the build steps and overrides that are available to every service, are shown below:

yaml
services:
  myservice:
    type: python:3.7
    port: 80
    ssl: false
    command: tail -f /dev/null

Specifying a command ​

Note that if you do not define a command for this service, it will effectively be a "cli" container (e.g. it will not serve or run an application by default but will be available to run python commands against).

If you want to actually launch a python application, consider setting the command to something as shown below:

yaml
services:
  myservice:
    type: python
    command: /app/my-server.py

Setting a port ​

While we assume your python service is running on port 80, we recognize that many python app's also run on port 8000 or otherwise. You can easily change our default to match whatever your app needs.

yaml
services:
  myservice:
    type: python
    port: 8000

Using SSL ​

Also note that ssl: true will only generate certs in the default locations. It is up to the user to use the certs and secure port correctly in their application like as in the python snippet below:

yaml
services:
  myservice:
    type: python
    ssl: true
    port: 443
python
// Starting HTTPS server
httpsd = HTTPServer(('0.0.0.0', 443), myHandler)