services: db: image: mariadb:lts command: "--skip-name-resolve=OFF" restart: always healthcheck: test: ['CMD', 'healthcheck.sh', '--connect', '--innodb_initialized'] interval: 10s retries: 5 timeout: 5s start_period: 5s volumes: - db-data:/var/lib/mysql - ./db/init:/docker-entrypoint-initdb.d/ - ./db/bu:/bu networks: - backnet environment: - MARIADB_ROOT_HOST=localhost - MARIADB_ROOT_PASSWORD=${DOTENV_MYSQL_ROOT_PASSWORD} expose: - 3306 - 33060 backend: build: context: backend target: builder # Next two are only debug, used without restart #stdin_open: true #tty: true restart: always # Comment following line to use flask (1worker, dev), uncomment to use uwsgi (wsgi) command: ["uwsgi", "--http", "0.0.0.0:8000", "--master", "-p", "4", "-w", "microblog:app"] container_name: backend environment: - MYSQL_USER=flasku #- MYSQL_PASSWORD=flaskp - DOTENV_MYSQL_PASSWORD=${DOTENV_MYSQL_FLASK_PASSWORD} - DOTENV_FLASK_SECRET_KEY=${FLASK_SECRET_KEY} - DOTENV_TOKEN_I=${FLASK_TOKEN_I} - DOTENV_TOKEN_C=${FLASK_TOKEN_C} - DOTENV_ADMIN_EMAIL=${FLASK_ADMIN_EMAIL} - DOTENV_FROM_ADDRESS=${FLASK_MAIL_FROM} - DOTENV_JWT_PHRASE=${FLASK_JWT_PHRASE} - DOTENV_REAL_HOSTNAME=${FLASK_REAL_HOSTNAME} - DOTENV_ALLOW_REGISTRATION=${ALLOW_REGISTRATION} #ports: # - 8000:8000 expose: - 8000 networks: - backnet - frontnet depends_on: db: condition: service_healthy gutsub: image: gitea/gitea:latest container_name: gitea restart: always environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=mysql - GITEA__database__HOST=db:3306 - GITEA__database__NAME=gitea - GITEA__database__USER=gitea - GITEA__database__PASSWD=${DOTENV_MYSQL_GITEA_PASSWORD} - GITEA__repository__DEFAULT_BRANCH=master - GITEA__mailer__ENABLED=true - GITEA__mailer__FROM=${GITEA_MAIL_FROM} - GITEA__mailer__USER= - GITEA__mailer__PROTOCOL=smtp - GITEA__mailer__SMTP_ADDR=pmb - GITEA__mailer__SMTP_PORT=25 - GITEA__service__REGISTER_EMAIL_CONFIRM=true - GITEA__service__ENABLE_NOTIFY_MAIL=true # To disable new users after setup: #- GITEA__service__DISABLE_REGISTRATION=false networks: - backnet - frontnet volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro #ports: # - "3000:3000" # - "222:22" depends_on: db: condition: service_healthy proxy: build: proxy restart: always volumes: - /home/finn/d/cert/var/lib/letsencrypt:/var/lib/letsencrypt:ro - /home/finn/d/cert/etc/letsencrypt:/etc/letsencrypt:ro ports: - "80:80" - "443:443" depends_on: - backend networks: - frontnet hs: container_name: tor_service build: context: tor environment: - USE_TOR=${USE_TOR} depends_on: - backend networks: - frontnet pmb: #build: # args: # GPG_PP: $BUILD_GPG_PP # context: pmb-pf # dockerfile: Dockerfile image: site_pmb:latest expose: - "25" env_file: - ./pmb-pf/.env restart: always volumes: - pmb-root:/root - /etc/localtime:/etc/localtime:ro networks: - backnet sshtun: build: context: sshtun dockerfile: Dockerfile restart: on-failure environment: - USE_TUN=${USE_TUN} ports: - "22222:22" expose: - "11112" networks: - frontnet volumes: db-data: pmb-root: networks: backnet: name: backnet frontnet: name: frontnet