Browse Source

Add info from #2286, minor fixes to YAML indentation (#3338)

* Add info from #2286, minor fixes to YAML indentation

* Add space to make YAML valid again
tags/v1.5.0-dev
Richard Coleman 6 years ago
parent
commit
869d73a25c
1 changed files with 19 additions and 4 deletions
  1. 19
    4
      docs/content/doc/installation/with-docker.en-us.md

+ 19
- 4
docs/content/doc/installation/with-docker.en-us.md View File

The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest` The most simple setup just creates a volume and a network and starts the `gitea/gitea:latest`
image as a service. Since there is no database available one can be initialized using SQLite3. image as a service. Since there is no database available one can be initialized using SQLite3.
Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`. Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`.
Note that the volume should be owned by the user/group with the UID/GID specified in the config file.
If you don't give the volume correct permissions, the container may not start.


```yaml ```yaml
version: "2" version: "2"
services: services:
server: server:
image: gitea/gitea:latest image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
restart: always restart: always
networks: networks:
- gitea - gitea
services: services:
server: server:
image: gitea/gitea:latest image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
restart: always restart: always
networks: networks:
- gitea - gitea
services: services:
server: server:
image: gitea/gitea:latest image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
restart: always restart: always
networks: networks:
- gitea - gitea
services: services:
server: server:
image: gitea/gitea:latest image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
restart: always restart: always
networks: networks:
- gitea - gitea
volumes: volumes:
- ./gitea:/data - ./gitea:/data
ports:
- "3000:3000"
- "222:22"
ports:
- "3000:3000"
- "222:22"
+ depends_on: + depends_on:
+ - db + - db
+ +


To use named volumes instead of host volumes, define and use the named volume To use named volumes instead of host volumes, define and use the named volume
within the `docker-compose.yml` configuration. This change will automatically within the `docker-compose.yml` configuration. This change will automatically
create the required volume.
create the required volume. You don't need to worry about permissions with
named volumes, Docker will deal with that automatically.


```diff ```diff
version: "2" version: "2"

Loading…
Cancel
Save