Clean up docker compose file

Removed nginx container (might want to put it back?)
Changed spacing to tabs for better readability
Changed the order, first the important stuff (plane) and later the database/redis
All containers should be in the same format (first container_name, then image, then restart, etc.).
Removed links because deprecated since compose version 2, all containers are in one docker network
Removed build from plane-api
Removed ports from redis and postgresql
Removed PGDATA directory because that's the default one
Renamed redis and db to plane-redis and plane-db
This commit is contained in:
Robin 2023-05-06 18:33:35 +00:00 committed by GitHub
parent 4884ecd668
commit eedf28ba27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,116 +1,98 @@
version: "3.8" version: "3.8"
services: services:
nginx: plane-web:
container_name: nginx container_name: planefrontend
build: image: makeplane/plane-frontend:0.6
context: ./nginx restart: always
dockerfile: Dockerfile command: /usr/local/bin/start.sh
ports: environment:
- 80:80 NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
depends_on: NEXT_PUBLIC_GOOGLE_CLIENTID: 0
- plane-web NEXT_PUBLIC_GITHUB_APP_NAME: 0
- plane-api NEXT_PUBLIC_GITHUB_ID: 0
db: NEXT_PUBLIC_SENTRY_DSN: 0
image: postgres:15.2-alpine NEXT_PUBLIC_ENABLE_OAUTH: 0
container_name: db NEXT_PUBLIC_ENABLE_SENTRY: 0
restart: always ports:
volumes: - 3000:3000
- pgdata:/var/lib/postgresql/data
environment: plane-api:
POSTGRES_USER: plane container_name: planebackend
POSTGRES_DB: plane image: makeplane/plane-backend:0.6
POSTGRES_PASSWORD: xyzzyspoon restart: always
PGDATA: /var/lib/postgresql/data command: ./bin/takeoff
command: postgres -c 'max_connections=1000' environment:
ports: DJANGO_SETTINGS_MODULE: plane.settings.production
- 5432:5432 DATABASE_URL: postgres://plane:xyzzyspoon@db:5432/plane
redis: REDIS_URL: redis://redis:6379/
image: redis:6.2.7-alpine EMAIL_HOST: ${EMAIL_HOST}
container_name: redis EMAIL_HOST_USER: ${EMAIL_HOST_USER}
restart: always EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
ports: AWS_REGION: ${AWS_REGION}
- 6379:6379 AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
volumes: AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
- redisdata:/data AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
plane-web: WEB_URL: localhost/
container_name: planefrontend GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
image: makeplane/plane-frontend:0.6 DISABLE_COLLECTSTATIC: 1
restart: always DOCKERIZED: 1
command: [ "/usr/local/bin/start.sh" ] OPENAI_API_KEY: ${OPENAI_API_KEY}
environment: GPT_ENGINE: ${GPT_ENGINE}
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL} SECRET_KEY: ${SECRET_KEY}
NEXT_PUBLIC_GOOGLE_CLIENTID: 0 depends_on:
NEXT_PUBLIC_GITHUB_APP_NAME: 0 - plane-db
NEXT_PUBLIC_GITHUB_ID: 0 - plane-redis
NEXT_PUBLIC_SENTRY_DSN: 0 ports:
NEXT_PUBLIC_ENABLE_OAUTH: 0 - 8000:8000
NEXT_PUBLIC_ENABLE_SENTRY: 0
ports: plane-worker:
- 3000:3000 container_name: planerqworker
plane-api: image: makeplane/plane-worker:0.6
container_name: planebackend restart: always
image: makeplane/plane-backend:0.6 command: ./bin/worker
build: environment:
context: ./apiserver DJANGO_SETTINGS_MODULE: plane.settings.production
dockerfile: Dockerfile.api DATABASE_URL: postgres://plane:xyzzyspoon@plane-db:5432/plane
restart: always REDIS_URL: redis://plane-redis:6379/
ports: EMAIL_HOST: ${EMAIL_HOST}
- 8000:8000 EMAIL_HOST_USER: ${EMAIL_HOST_USER}
environment: EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
DJANGO_SETTINGS_MODULE: plane.settings.production AWS_REGION: ${AWS_REGION}
DATABASE_URL: postgres://plane:xyzzyspoon@db:5432/plane AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
REDIS_URL: redis://redis:6379/ AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
EMAIL_HOST: ${EMAIL_HOST} AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
EMAIL_HOST_USER: ${EMAIL_HOST_USER} WEB_URL: localhost/
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
AWS_REGION: ${AWS_REGION} DISABLE_COLLECTSTATIC: 1
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} DOCKERIZED: 1
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} OPENAI_API_KEY: ${OPENAI_API_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME} GPT_ENGINE: ${GPT_ENGINE}
WEB_URL: localhost/ SECRET_KEY: ${SECRET_KEY}
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} depends_on:
DISABLE_COLLECTSTATIC: 1 - plane-api
DOCKERIZED: 1 - plane-db
OPENAI_API_KEY: ${OPENAI_API_KEY} - plane-redis
GPT_ENGINE: ${GPT_ENGINE}
SECRET_KEY: ${SECRET_KEY} plane-db:
depends_on: container_name: plane-db
- db image: postgres:15.2-alpine
- redis restart: always
command: ./bin/takeoff command: postgres -c 'max_connections=1000'
links: environment:
- db:db POSTGRES_USER: plane
- redis:redis POSTGRES_DB: plane
plane-worker: POSTGRES_PASSWORD: xyzzyspoon
container_name: planerqworker volumes:
image: makeplane/plane-worker:0.6 - pgdata:/var/lib/postgresql/data
depends_on:
- redis plane-redis:
- db container_name: plane-redis
- plane-api image: redis:6.2.7-alpine
command: ./bin/worker restart: always
links: volumes:
- redis:redis - redisdata:/data
- db:db
environment:
DJANGO_SETTINGS_MODULE: plane.settings.production
DATABASE_URL: postgres://plane:xyzzyspoon@db:5432/plane
REDIS_URL: redis://redis:6379/
EMAIL_HOST: ${EMAIL_HOST}
EMAIL_HOST_USER: ${EMAIL_HOST_USER}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD}
AWS_REGION: ${AWS_REGION}
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
WEB_URL: localhost/
GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET}
DISABLE_COLLECTSTATIC: 1
DOCKERIZED: 1
OPENAI_API_KEY: ${OPENAI_API_KEY}
GPT_ENGINE: ${GPT_ENGINE}
SECRET_KEY: ${SECRET_KEY}
volumes: volumes:
pgdata: pgdata:
redisdata: redisdata: