feat: modernized the docker-compose file (#776)

This commit allows the port to be controlled using environment variables without having to edit the file which can be troublesome as this app is deployed as a git repo.

Additionaly this commits removes the `version` field which is now deprecated (read: https://docs.docker.com/reference/compose-file/version-and-name/#version-top-level-element-obsolete)
This commit is contained in:
Kalitsune 2024-09-04 13:15:35 +02:00 committed by GitHub
parent 348f2c8ff1
commit 366aa03a0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 8 deletions

View File

@ -110,6 +110,11 @@ PORTAINER_PASSWORD=password1234
# Cloudflare tunnel token
CLOUDFLARE_TUNNEL_TOKEN=
# NGINX
# Optional, change this if you want to use custom ports to expose AppFlowy
NGINX_PORT=80
NGINX_TLS_PORT=443
# If you are using a different postgres database, change the following values
# GOTRUE_DATABASE_URL=postgres://supabase_auth_admin:root@<host>:<port>/$POSTGRES_DB
# APPFLOWY_DATABASE_URL=postgres://POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$POSTGRES_DB

View File

@ -1,13 +1,12 @@
# Essential services for AppFlowy Cloud
version: '3'
services:
nginx:
restart: on-failure
image: nginx
ports:
- 80:80 # Disable this if you are using TLS
- 443:443
- ${NGINX_PORT:-80}:80 # Disable this if you are using TLS
- ${NGINX_TLS_PORT:-443}:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl/certificate.crt:/etc/nginx/ssl/certificate.crt

View File

@ -1,4 +1,3 @@
version: '3'
services:
nginx:
restart: on-failure

View File

@ -1,6 +1,5 @@
# Non-essential additional services
version: '3'
services:
tunnel:
image: cloudflare/cloudflared

View File

@ -1,13 +1,12 @@
# Essential services for AppFlowy Cloud
version: '3'
services:
nginx:
restart: on-failure
image: nginx
ports:
- 80:80 # Disable this if you are using TLS
- 443:443
- ${NGINX_PORT:-80}:80 # Disable this if you are using TLS
- ${NGINX_TLS_PORT:-443}:443
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl/certificate.crt:/etc/nginx/ssl/certificate.crt