Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .docker/Dockerfile.proxy-coordinator
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM docker:27-cli

RUN apk add --no-cache docker-cli-compose

COPY scripts/proxy-coordinator.sh /usr/local/bin/proxy-coordinator.sh

RUN chmod +x /usr/local/bin/proxy-coordinator.sh

ENTRYPOINT ["/usr/local/bin/proxy-coordinator.sh"]
51 changes: 51 additions & 0 deletions .docker/docker-compose.proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
services:
nginx-proxy:
image: nginxproxy/nginx-proxy:1.11-alpine
container_name: librecode-dev-proxy
restart: unless-stopped
labels:
coop.librecode.dev-proxy: "true"
ports:
- "80:80"
- "443:443"
volumes:
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/tmp/docker.sock:ro
- librecode-dev-proxy-vhost:/etc/nginx/vhost.d
- librecode-dev-proxy-conf:/etc/nginx/conf.d
- librecode-dev-proxy-log:/etc/nginx/log
- librecode-dev-proxy-certs:/etc/nginx/certs:ro
- librecode-dev-proxy-html:/usr/share/nginx/html
environment:
- ENABLE_IPV6=true
networks:
- proxy

ssl-companion:
image: sebastienheyd/self-signed-proxy-companion:latest
container_name: librecode-dev-proxy-ssl-companion
restart: unless-stopped
labels:
coop.librecode.dev-proxy-companion: "true"
volumes:
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock:ro
- librecode-dev-proxy-certs:/etc/nginx/certs:rw
environment:
- NGINX_PROXY_CONTAINER=librecode-dev-proxy
networks:
- proxy

networks:
proxy:
name: librecode-dev-proxy

volumes:
librecode-dev-proxy-vhost:
name: librecode-dev-proxy-vhost
librecode-dev-proxy-conf:
name: librecode-dev-proxy-conf
librecode-dev-proxy-log:
name: librecode-dev-proxy-log
librecode-dev-proxy-certs:
name: librecode-dev-proxy-certs
librecode-dev-proxy-html:
name: librecode-dev-proxy-html
72 changes: 72 additions & 0 deletions .docker/nginx-proxy/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LibreCode Development Proxy</title>
<style>
:root {
color-scheme: light dark;
font-family: system-ui, sans-serif;
}

body {
margin: 0;
min-height: 100vh;
display: grid;
place-items: center;
background: Canvas;
color: CanvasText;
}

main {
width: min(680px, calc(100% - 48px));
padding: 32px;
border: 1px solid color-mix(in srgb, CanvasText 20%, transparent);
border-radius: 12px;
}

h1 {
margin-top: 0;
font-size: 1.5rem;
}

code {
padding: 0.15em 0.4em;
border-radius: 4px;
background: color-mix(in srgb, CanvasText 10%, transparent);
}

.status {
margin-top: 24px;
font-size: 0.9rem;
opacity: 0.7;
}
</style>
</head>
<body>
<main>
<h1>πŸ’™ LibreCode Development Proxy</h1>

<p>The shared development proxy is running.</p>

<p>
Open your environment using the URL shown by
<code>docker compose up</code>.
</p>

<p>
The hostname is usually based on the project directory name:
</p>

<p>
<code>php83-master/</code>
β†’ <code>https://php83-master.localhost</code>
</p>

<p class="status">
Requests to <code>*.localhost</code> are routed automatically.
</p>
</main>
</body>
</html>
13 changes: 13 additions & 0 deletions .docker/nginx-proxy/localhost.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
server {
listen 80;
listen [::]:80;

server_name localhost;

root /usr/share/nginx/html;
index index.html;

location / {
try_files /index.html =404;
}
}
7 changes: 7 additions & 0 deletions .docker/scripts/nextcloud-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ if ! occ status | grep -q 'installed: true'; then
exit 1
fi

if [[ -n "${NEXTCLOUD_HOST:-}" ]]; then
echo "πŸ”§ Setting trusted domain and overwritehost to ${NEXTCLOUD_HOST} ..."
occ config:system:set trusted_domains 1 --value "${NEXTCLOUD_HOST}"
occ config:system:set overwritehost --value "${NEXTCLOUD_HOST}"
occ config:system:set overwriteprotocol --value https
fi

# Run cron
echo "πŸ“… Running cron for the first time ..."
exec busybox crond -f -l 0 -L /dev/stdout > /dev/null 2>&1 &
Expand Down
125 changes: 0 additions & 125 deletions .docker/scripts/nginx-port-selector.sh

This file was deleted.

Loading