Fix default port mapping and indentation

Signed-off-by: Anca Iordache <anca.iordache@docker.com>
This commit is contained in:
Anca Iordache
2020-03-24 00:36:46 +01:00
parent dc1bb13dce
commit 77c6920a83
20 changed files with 111 additions and 108 deletions

View File

@@ -15,7 +15,7 @@ services:
gitea:
image: gitea/gitea:latest
ports:
- 80:3000
- 3000:3000
...
db:
image: postgres:alpine
@@ -24,7 +24,7 @@ services:
```
When deploying this setup, docker-compose maps the nextcloud container port 3000 to
port 80 of the host as specified in the compose file.
the same port of the host as specified in the compose file.
## Deploy with docker-compose
@@ -46,11 +46,11 @@ Check containers are running and the port mapping:
```
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2f5624043da9 gitea/gitea:latest "/usr/bin/entrypoint…" 56 seconds ago Up 16 seconds 22/tcp, 0.0.0.0:80->3000/tcp gitea-postgres_gitea_1
2f5624043da9 gitea/gitea:latest "/usr/bin/entrypoint…" 56 seconds ago Up 16 seconds 22/tcp, 0.0.0.0:3000->3000/tcp gitea-postgres_gitea_1
86acc768453e postgres:alpine "docker-entrypoint.s…" 57 seconds ago Up 17 seconds 5432/tcp gitea-postgres_db_1
```
Navigate to `http://localhost:80` in your web browser to access the installed
Navigate to `http://localhost:3000` in your web browser to access the installed
Gitea service.
![page](output.jpg)

View File

@@ -12,9 +12,7 @@ services:
volumes:
- git_data:/data
ports:
- 80:3000
depends_on:
- db
- 3000:3000
db:
image: postgres:alpine
environment: