add quotation around ports in docker-compose.yml (#3090)

This commit is contained in:
bibaijin authored and Lunny Xiao committed 2017-12-05 14:03:40 +08:00
1 parent b4a62ee6f1
commit 8b4833b3cc
1 file changed
+12 -12
+12 -12
View File
@@ -39,8 +39,8 @@ services:
volumes: volumes:
- ./gitea:/data - ./gitea:/data
ports: ports:
- 3000:3000 - "3000:3000"
- 222:22 - "222:22"
``` ```
## Custom port ## Custom port
@@ -63,10 +63,10 @@ services:
volumes: volumes:
- ./gitea:/data - ./gitea:/data
ports: ports:
- - 3000:3000 - - "3000:3000"
- - 222:22 - - "222:22"
+ - 8080:3000 + - "8080:3000"
+ - 2221:22 + - "2221:22"
``` ```
## MySQL database ## MySQL database
@@ -89,8 +89,8 @@ services:
volumes: volumes:
- ./gitea:/data - ./gitea:/data
ports: ports:
- 3000:3000 - "3000:3000"
- 222:22 - "222:22"
+ depends_on: + depends_on:
+ - db + - db
+ +
@@ -128,8 +128,8 @@ services:
volumes: volumes:
- ./gitea:/data - ./gitea:/data
ports: ports:
- 3000:3000 - "3000:3000"
- 222:22 - "222:22"
+ depends_on: + depends_on:
+ - db + - db
+ +
@@ -171,8 +171,8 @@ services:
- - ./gitea:/data - - ./gitea:/data
+ - gitea:/data + - gitea:/data
ports: ports:
- 3000:3000 - "3000:3000"
- 222:22 - "222:22"
``` ```
If you are using MySQL or PostgreSQL it's up to you to create named volumes for these containers as well. If you are using MySQL or PostgreSQL it's up to you to create named volumes for these containers as well.