Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
77c191f
extenginx: create self signed certs automatically
charliemirabile Mar 26, 2024
f74ff54
container-compose: switch ssl mount from bind to volume
charliemirabile Mar 26, 2024
13d0122
extenginx: remove unused create_dev_keys.sh
charliemirabile Mar 26, 2024
8b6ea65
extenginx: remove specific runtime snippets option
charliemirabile Mar 26, 2024
ae5f3f4
extenginx: remove expose instructions
charliemirabile Mar 26, 2024
01b346e
extenginx: split envsubst multiline to ease reading/editing
charliemirabile Mar 26, 2024
76e02bb
extenginx: remove support for http connections
charliemirabile Mar 26, 2024
a92779e
extenginx: switch from ports to full listen specifications
charliemirabile Mar 26, 2024
4911078
container-compose: switch to unix sockets for nginx
charliemirabile Mar 26, 2024
a671b77
tests: switch to connecting directly to unix sockets
charliemirabile Mar 31, 2024
2a245da
introduce webroot to build process of extenginx
charliemirabile Mar 26, 2024
a308b3d
nginx: re-number server_https snippets
charliemirabile Mar 31, 2024
0803d4e
container-compose: switch email to named volume
charliemirabile Mar 26, 2024
6dd56ef
orbit: add docs and git dir as build contexts
charliemirabile Mar 26, 2024
355f27e
orbit: save database in volume for persistance
charliemirabile Mar 31, 2024
7b9e67a
use .env for hostname and version info
charliemirabile Mar 26, 2024
fd0ab24
remove container-compose-staging.yml
charliemirabile Mar 26, 2024
ae000da
container-compose-dev.yml: use include to remove duplicate stuff
charliemirabile Mar 26, 2024
9b645e3
introduce compose.yml that includes the appropriate base yml based on…
charliemirabile Mar 26, 2024
538c261
rename compose files to better represent purpose
charliemirabile Mar 26, 2024
097b134
rename to remove container prefix
charliemirabile Mar 26, 2024
3cb62f0
compose/Containerfiles: make all additional contexts lowercase
charliemirabile Mar 26, 2024
c5462e6
docker compose fixes
charliemirabile Mar 26, 2024
f5e4e69
fix dev build for docker-compose
charliemirabile Mar 27, 2024
326fb2c
test: adapt script to the mega cleanup
theyoyojo Mar 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
68 changes: 68 additions & 0 deletions activate
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
_SINGULARITY_ACTIVATE_CONTAINER_BACKEND=${CONTAINER_BACKEND:-podman}

[ "$(command -v deactivate)" = "deactivate" ] && [ -z "${SINGULARITY_ACTIVATE_OVERWRITE_DEACTIVATE+x}" ] && {
echo 'refusing to overwrite deactivate function. set SINGULARITY_ACTIVATE_OVERWRITE_DEACTIVATE to override' >&2
return 1
}

deactivate () {
unset -v PS1
if [ -n "${_SINGULARITY_ACTIVATE_OLD_PS1_VALUE+x}" ]
then
PS1="${_SINGULARITY_ACTIVATE_OLD_PS1_VALUE}"
unset -v _SINGULARITY_ACTIVATE_OLD_PS1_VALUE
if [ -n "${_SINGULARITY_ACTIVATE_PS1_WAS_EXPORTED+x}" ]
then
export PS1
unset -v _SINGULARITY_ACTIVATE_PS1_WAS_EXPORTED
fi
fi

unset -v DOCKER_HOST
if [ -n "${_SINGULARITY_ACTIVATE_OLD_DOCKER_HOST_VALUE+x}" ]
then
DOCKER_HOST="${_SINGULARITY_ACTIVATE_OLD_DOCKER_HOST_VALUE}"
unset -v _SINGULARITY_ACTIVATE_OLD_DOCKER_HOST_VALUE
if [ -n "${_SINGULARITY_ACTIVATE_DOCKER_HOST_WAS_EXPORTED+x}" ]
then
export DOCKER_HOST
unset -v _SINGULARITY_ACTIVATE_DOCKER_HOST_WAS_EXPORTED
fi
fi

if [ -n "${_SINGULARITY_ACTIVATE_CONTAINER_SOCKET_WAS_ACTIVE+x}" ]
then
unset -v _SINGULARITY_ACTIVATE_CONTAINER_SOCKET_WAS_ACTIVE
else
systemctl stop --user ${_SINGULARITY_ACTIVATE_CONTAINER_BACKEND}.socket
fi

unset -f deactivate
}

if systemctl --user is-active ${_SINGULARITY_ACTIVATE_CONTAINER_BACKEND}.socket --quiet
then
_SINGULARITY_ACTIVATE_CONTAINER_SOCKET_WAS_ACTIVE=1
else
systemctl --user start ${_SINGULARITY_ACTIVATE_CONTAINER_BACKEND}.socket
fi

if [ -n "${DOCKER_HOST+x}" ]
then
_SINGULARITY_ACTIVATE_OLD_DOCKER_HOST_VALUE="${DOCKER_HOST}"
if env | grep -q '^DOCKER_HOST='
then
_SINGULARITY_ACTIVATE_DOCKER_HOST_WAS_EXPORTED=1
fi
fi
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/${_SINGULARITY_ACTIVATE_CONTAINER_BACKEND}/${_SINGULARITY_ACTIVATE_CONTAINER_BACKEND}.sock"

if [ -n "${PS1+x}" ]
then
_SINGULARITY_ACTIVATE_OLD_PS1_VALUE="${PS1}"
if env | grep '^PS1='
then
_SINGULARITY_ACTIVATE_PS1_WAS_EXPORTED=1
fi
fi
PS1="(singularity) ${PS1}"
93 changes: 93 additions & 0 deletions compose-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
services:
nginx:
build:
context: extenginx
additional_contexts:
- nginx_snippet_source=./nginx_snippets
- nginx_webroot_content=./kdlp.underground.software
dockerfile: Containerfile
target: nginx
args:
NGINX_HOSTNAME: ${SINGULARITY_HOSTNAME}
NGINX_HTTPS_LISTEN: 'unix:/run/nginx/socks/https.sock'
NGINX_SMTPS_LISTEN: 'unix:/run/nginx/socks/smtps.sock'
NGINX_POP3S_LISTEN: 'unix:/run/nginx/socks/pop3s.sock'
volumes:
- type: bind
source: ./socks
target: /run/nginx/socks
- type: volume
source: ssl-certs
target: /etc/ssl/nginx
read_only: true
depends_on:
- orbit
- smtp
- pop
networks:
- orbit
- smtp
- pop
orbit:
build:
context: orbit
dockerfile: Containerfile
additional_contexts:
- orbit_singularity_git_dir=./gitdir
- orbit_docs_source=./kdlp.underground.software
target: orbit
args:
orbit_version_info: "singularity ${SINGULARITY_VERSION_INFO} https://github.com/underground-software/singularity"
volumes:
- type: volume
source: orbit-db
target: /var/orbit
read_only: false
networks:
- orbit
smtp:
build:
context: smtp
dockerfile: Containerfile
additional_contexts:
- tcp_server_source=./tcp_server
target: smtp
args:
hostname: ${SINGULARITY_HOSTNAME}
LISTEN_PORT: 1465
volumes:
- type: volume
source: email
target: /mnt/email_data
read_only: false
networks:
- smtp
pop:
build:
context: pop
dockerfile: Containerfile
additional_contexts:
- tcp_server_source=./tcp_server
target: pop
args:
LISTEN_PORT: 1995
volumes:
- type: volume
source: email
target: /mnt/email_data
read_only: true
depends_on:
- smtp
networks:
- pop
networks:
orbit:
name: orbit
smtp:
name: smtp
pop:
name: pop
volumes:
ssl-certs:
email:
orbit-db:
23 changes: 23 additions & 0 deletions compose-dev-override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
include:
- ${SINGULARITY_INCLUDE_PATH}
services:
nginx:
security_opt:
- label:disable
volumes:
- type: bind
source: ./nginx_snippets
target: /etc/nginx/include.d
read_only: true
- type: bind
source: ./kdlp.underground.software
target: /var/www/html
read_only: true
orbit:
security_opt:
- label:disable
volumes:
- type: bind
source: ./kdlp.underground.software
target: /orbit/docs
read_only: true
2 changes: 2 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include:
- "${SINGULARITY_COMPOSE_BASE}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no f

@erer1243 erer1243 Mar 28, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sfingularity? What f

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h

127 changes: 0 additions & 127 deletions container-compose-dev.yml

This file was deleted.

Loading