Reference repo for running Gitea with docker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

55 lines
1.1 KiB

version: '3.7'
services:
mysql:
image: mariadb
restart: always
networks:
- db_net
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
MYSQL_DATABASE: 'gitea'
MYSQL_USER: 'gitea'
MYSQL_PASSWORD: ${DB_PASSWORD}
gitea:
depends_on:
- mysql
image: gitea/gitea
restart: always
volumes:
- ./data:/data
environment:
USER_UID: '1000'
USER_GID: '1000'
DB_TYPE: 'mysql'
DB_HOST: 'mysql:3306'
DB_NAME: 'gitea'
DB_USER: 'gitea'
DB_PASSWD: ${DB_PASSWORD}
RUN_MODE: prod
ROOT_URL: https://code.example.com/
SSH_DOMAIN: code.example.com
APP_NAME: 'Gitea: Git with a cup of tea'
ports:
- '22:22'
networks:
- reverse_proxy
- db_net
nginx:
depends_on:
- gitea
image: nginx:latest
restart: always
volumes:
- ./nginx:/etc/nginx
- ./letsencrypt:/etc/letsencrypt
networks:
- reverse_proxy
ports:
- '80:80'
- '443:443'
networks:
reverse_proxy:
db_net: