volumes:
- ./gitea:/data
ports:
- - 3000:3000
- - 222:22
+ - "3000:3000"
+ - "222:22"
```
## Custom port
volumes:
- ./gitea:/data
ports:
-- - 3000:3000
-- - 222:22
-+ - 8080:3000
-+ - 2221:22
+- - "3000:3000"
+- - "222:22"
++ - "8080:3000"
++ - "2221:22"
```
## MySQL database
volumes:
- ./gitea:/data
ports:
- - 3000:3000
- - 222:22
+ - "3000:3000"
+ - "222:22"
+ depends_on:
+ - db
+
volumes:
- ./gitea:/data
ports:
- - 3000:3000
- - 222:22
+ - "3000:3000"
+ - "222:22"
+ depends_on:
+ - db
+
- - ./gitea:/data
+ - gitea:/data
ports:
- - 3000:3000
- - 222:22
+ - "3000:3000"
+ - "222:22"
```
If you are using MySQL or PostgreSQL it's up to you to create named volumes for these containers as well.