# Use absolute 'path = http://github/debiki/repo' for everything. Not relative
# 'path = ../something' paths, because such paths break, if one clones the main
# Talkyard repo only (but doesn't clone all Talkyard submodules locally too).
#
[submodule "images/web/ty-media"]
	path = images/web/ty-media
	url = https://github.com/debiki/ty-media.git
[submodule "modules/ty-test-media"]
	path = modules/ty-test-media
	url = https://github.com/debiki/ty-test-media
[submodule "modules/ty-translations"]
	path = modules/ty-translations
	url = https://github.com/debiki/ty-translations.git
[submodule "modules/google-diff-match-patch"]
	path = modules/google-diff-match-patch
	url = https://github.com/google/diff-match-patch.git
[submodule "modules/ed-prod-one-test"]
	path = modules/ed-prod-one-test
	url = https://github.com/debiki/talkyard-prod-one.git
[submodule "modules/ed-versions"]
	path = modules/ed-versions
	url = https://github.com/debiki/talkyard-versions.git

# CLEAN_UP REMOVE it's bundled with OpenResty
[submodule "images/web/modules/lua-nginx-module"]
	path = images/web/modules/lua-nginx-module
	url = https://github.com/openresty/lua-nginx-module.git

# CLEAN_UP REMOVE it's bundled with OpenResty
[submodule "images/web/modules/luajit"]
	path = images/web/modules/luajit
	# This LuaJIT GitHub repo is a mirror of: http://luajit.org/git/luajit-2.0.git
	# We use the mirror instead of the main repo, because someone had problems accessing the
	# main repo (corporate or country firewall?) but the GitHub mirror worked fine.
	# I (KajMagnus) asked if the mirror here is maintained by Mike Pall:
	# https://www.freelists.org/post/luajit/Sequrity-question-Is-httpsgithubcomLuaJIT-maintained-by-Mike-Pall
	# and someone there replied:
	#  > the fast and short answer is yes. however he is busy with other things,
	#  > so he just appears from time to time to handle issues and pull requests [...]
	url = https://github.com/LuaJIT/LuaJIT.git
[submodule "images/web/modules/ngx_devel_kit"]
	path = images/web/modules/ngx_devel_kit
	url = https://github.com/simpl/ngx_devel_kit.git

# But keep this.
[submodule "images/web/lua-packages/lua-resty-http"]
	path = images/web/lua-packages/lua-resty-http
	url = https://github.com/ledgetech/lua-resty-http.git

# CLEAN_UP REMOVE it's bundled with OpenResty
[submodule "images/web/lua-packages/lua-resty-redis"]
	path = images/web/lua-packages/lua-resty-redis
	url = https://github.com/openresty/lua-resty-redis.git

# CLEAN_UP REMOVE it's bundled with OpenResty
[submodule "images/web/lua-packages/lua-resty-lrucache"]
	path = images/web/lua-packages/lua-resty-lrucache
	url = https://github.com/openresty/lua-resty-lrucache.git

[submodule "modules/sanitize-html"]
	path = modules/sanitize-html
	url = https://github.com/debiki/sanitize-html.git
[submodule "modules/gatsby-plugin-ed-comments"]
	path = modules/gatsby-plugin-ed-comments
	url = https://github.com/debiki/gatsby-plugin-ed-comments.git
[submodule "modules/gatsby-starter-blog"]
	path = modules/gatsby-starter-blog
	url = https://github.com/debiki/gatsby-starter-blog.git
[submodule "modules/gatsby-starter-blog-ed-comments-0.4.4"]
	path = modules/gatsby-starter-blog-ed-comments-0.4.4
	url = https://github.com/debiki/gatsby-starter-blog.git
[submodule "images/fakemail/mailslurper"]
	path = images/fakemail/mailslurper
	url = https://github.com/mailslurper/mailslurper.git
[submodule "modules/talkyard-prod-swarm"]
	path = modules/talkyard-prod-swarm
	url = https://github.com/debiki/talkyard-prod-swarm.git


# ----- Release channels

# Each release channel has its own branch in the talkyard-version repo.
# And, in ./relchans/, they're checked out in sub directories, one
# directory per release channel (Git branch).

[submodule "relchans/tyse-v0-dev"]
	path = relchans/tyse-v0-dev
	url = https://github.com/debiki/talkyard-versions.git
	branch = tyse-v0-dev

# [submodule "relchans/tyse-v0-rapid"]  — later

[submodule "relchans/tyse-v0-regular"]
	path = relchans/tyse-v0-regular
	url = https://github.com/debiki/talkyard-versions.git
	branch = tyse-v0-regular

# [submodule "relchans/tyse-v0-stable"]  — later


# ----- Vendored dependencies

# Vendored code is in the ty-vendors repo, but in different branches
# — and each branch is checked out as a separate submodule, where it's needed,
# e.g. OpenResty at images/web/openresty, so accessible to the
# images/web/Dockerfile.
# But why not different submodules, instead of branches? Because creating
# different submodules is boring, right. And having "too many" submodule repos
# to maintain, is also boring (e.g. if relocating all repos, then many to move).
# Creating a new branch is quicker – and, long term, a tiny time saver (?).
#
# To fetch only the current branch from the remote repo, do this:
#
#   git fetch origin `git rev-parse --abbrev-ref HEAD`
#
#   # Or with Git >= v2.22: (not tested)
#   git fetch origin `git branch --show-current`
#
# To add a submodule but only a branch, do e.g.:
#
#   git submodule add -b ty-openresty \
#       https://github.com/debiki/ty-vendors.git \
#       images/web/openresty
#
# Maybe different platforms (Debian 9 or 10 or Ubuntu 20.04 or maybe
# MS and Cygwin somehow?) will sometimes download or generate slightly
# different files?  So maybe this approach with vendored deps in submodules,
# will need some tweaking somehow. — Code get compiled and built
# in containers, but *not* Webdriverio test suite; it runs directly
# on the host OS (so any node-gyp built stuff then depends on the host OS).


# The browser app.
[submodule "node_modules"]
	path = node_modules
	url = https://github.com/debiki/ty-vendors.git
	branch = ty-node_modules

# And:
# [submodule "tests/e2e/node_modules"]
#	url = https://github.com/debiki/ty-vendors.git
#	branch = ty-tests-e2e-node_modules
#
# ??
# git checkout --branch ty-tests-e2e-node_modules zero

# [submodule "tests/e2e-wdio7/node_modules"]
#	url = https://github.com/debiki/ty-vendors.git
#	branch = ty-tests-e2e-wdio7-node_modules

# App server: Scala, JARs.
[submodule "vendors/jars"]
	path = vendors/jars
	url = https://github.com/debiki/ty-vendors.git
	branch = ty-vendors-jars

# OpenResty.
[submodule "images/web/openresty"]
	path = images/web/openresty
	url = https://github.com/debiki/ty-vendors.git
	branch = ty-openresty

# OpenResty Lua packages.
[submodule "images/web/lua-packages/inspect.lua"]
	path = images/web/lua-packages/inspect.lua
	url = https://github.com/kikito/inspect.lua.git

[submodule "images/web/openresty-pkgs"]
	path = images/web/openresty-pkgs
	url = https://github.com/debiki/ty-vendors.git
	branch = ty-images-web-openresty-pkgs

# Fonts.
# This is a separate npm repo with woff2 font files, so they can be
# Dockerfile COPY:ied into the 'web' image.
[submodule "images/web/node_modules"]
	path = images/web/node_modules
	url = https://github.com/debiki/ty-vendors.git
	branch = ty-images-web-node_modules

# Scala Build Tool.
# For building the app server (Play Framework) from inside the 'app' Docker image.
[submodule "images/app/sbt"]
	path = images/app/sbt
	url = https://github.com/debiki/ty-vendors.git
	branch = ty-images-app-sbt-1.4.5
