Skip to content

Commit

Permalink
feat: modernized the docker-compose file (#776)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Kalitsune authored Sep 4, 2024
1 parent 348f2c8 commit 366aa03
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 5 additions & 0 deletions deploy.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docker-compose-ci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3'
services:
nginx:
restart: on-failure
Expand Down
1 change: 0 additions & 1 deletion docker-compose-extras.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Non-essential additional services

version: '3'
services:
tunnel:
image: cloudflare/cloudflared
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 366aa03

Please sign in to comment.