Skip to content
This repository was archived by the owner on Sep 10, 2020. It is now read-only.

Commit 694b6d8

Browse files
committed
feat(docker): split expose_port into expose setting
Instead of defining expose_port inside a service, you now have to define port and service inside the new "expose" setting.
1 parent 5d05762 commit 694b6d8

File tree

5 files changed

+40
-12
lines changed

5 files changed

+40
-12
lines changed

.github/workflows/go.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@ name: Go
22

33
on:
44
push:
5-
branches: [ master ]
6-
paths:
7-
- src
5+
branches:
6+
- master
87
pull_request:
9-
branches: [ master ]
10-
paths:
11-
- src
8+
branches:
9+
- master
1210

1311
jobs:
1412

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
domain: mydomain.com
3+
deployment:
4+
type: docker
5+
settings:
6+
expose:
7+
service: app
8+
services:
9+
app:
10+
image: getstackhead/project-demo-php
11+
links:
12+
- db
13+
db:
14+
image: mariadb:10.5
15+
expose_port: 3306
16+
environment:
17+
MYSQL_ROOT_PASSWORD: example

examples/invalid/docker_double-expose.yml renamed to examples/invalid/docker_missing-expose-service.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ domain: mydomain.com
33
deployment:
44
type: docker
55
settings:
6+
expose:
7+
port: 8080
68
services:
79
app:
810
image: getstackhead/project-demo-php
9-
expose_port: 8080
1011
links:
1112
- db
1213
db:

examples/valid/docker_project.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ domain: mydomain.com
33
deployment:
44
type: docker
55
settings:
6+
expose:
7+
service: app
8+
port: 8080
69
services:
710
app:
811
image: getstackhead/project-demo-php
9-
expose_port: 8080
1012
links:
1113
- db
1214
db:

schema/project-definition.schema.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
"description": "Name of Docker image",
1717
"type": "string"
1818
},
19-
"expose_port": {
20-
"description": "Port that receives web traffic (e.g. 80, 3000, 8080 for most applications). Only one in this file!",
21-
"type": "integer"
22-
},
2319
"environment": {
2420
"description": "Docker environment variables",
2521
"type": "object"
@@ -60,6 +56,20 @@
6056
"settings": {
6157
"additionalProperties": false,
6258
"properties": {
59+
"expose": {
60+
"type": "object",
61+
"properties": {
62+
"service": {
63+
"type": "string",
64+
"description": "Name of the service below that exposes the port"
65+
},
66+
"port": {
67+
"type": "integer",
68+
"description": "Port that receives web traffic (e.g. 80, 3000, 8080 for most applications)"
69+
}
70+
},
71+
"required": ["service", "port"]
72+
},
6373
"services": {
6474
"description": "List of Docker services to be started",
6575
"type": "object",

0 commit comments

Comments
 (0)