mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: update docker setup to mount env file (#1270)
This commit is contained in:
parent
6b1d20449b
commit
885f5deebe
@ -27,6 +27,12 @@ PGUSER="plane"
|
|||||||
PGPASSWORD="plane"
|
PGPASSWORD="plane"
|
||||||
PGHOST="plane-db"
|
PGHOST="plane-db"
|
||||||
PGDATABASE="plane"
|
PGDATABASE="plane"
|
||||||
|
DATABASE_URL=postgresql://${PGUSER}:${PGPASSWORD}@${PGHOST}/${PGDATABASE}
|
||||||
|
|
||||||
|
# Redis Settings
|
||||||
|
REDIS_HOST="plane-redis"
|
||||||
|
REDIS_PORT="6379"
|
||||||
|
REDIS_URL="redis://${REDIS_HOST}:6379/"
|
||||||
|
|
||||||
# Email Settings
|
# Email Settings
|
||||||
EMAIL_HOST=""
|
EMAIL_HOST=""
|
||||||
|
@ -6,6 +6,8 @@ services:
|
|||||||
image: makeplane/plane-frontend:latest
|
image: makeplane/plane-frontend:latest
|
||||||
restart: always
|
restart: always
|
||||||
command: /usr/local/bin/start.sh
|
command: /usr/local/bin/start.sh
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
||||||
NEXT_PUBLIC_GOOGLE_CLIENTID: 0
|
NEXT_PUBLIC_GOOGLE_CLIENTID: 0
|
||||||
@ -14,12 +16,17 @@ services:
|
|||||||
NEXT_PUBLIC_SENTRY_DSN: 0
|
NEXT_PUBLIC_SENTRY_DSN: 0
|
||||||
NEXT_PUBLIC_ENABLE_OAUTH: 0
|
NEXT_PUBLIC_ENABLE_OAUTH: 0
|
||||||
NEXT_PUBLIC_ENABLE_SENTRY: 0
|
NEXT_PUBLIC_ENABLE_SENTRY: 0
|
||||||
|
depends_on:
|
||||||
|
- plane-api
|
||||||
|
- plane-worker
|
||||||
|
|
||||||
plane-api:
|
plane-api:
|
||||||
container_name: planebackend
|
container_name: planebackend
|
||||||
image: makeplane/plane-backend:latest
|
image: makeplane/plane-backend:latest
|
||||||
restart: always
|
restart: always
|
||||||
command: ./bin/takeoff
|
command: ./bin/takeoff
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: plane.settings.production
|
DJANGO_SETTINGS_MODULE: plane.settings.production
|
||||||
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
||||||
@ -54,6 +61,8 @@ services:
|
|||||||
image: makeplane/plane-worker:latest
|
image: makeplane/plane-worker:latest
|
||||||
restart: always
|
restart: always
|
||||||
command: ./bin/worker
|
command: ./bin/worker
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: plane.settings.production
|
DJANGO_SETTINGS_MODULE: plane.settings.production
|
||||||
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
||||||
@ -89,6 +98,8 @@ services:
|
|||||||
image: postgres:15.2-alpine
|
image: postgres:15.2-alpine
|
||||||
restart: always
|
restart: always
|
||||||
command: postgres -c 'max_connections=1000'
|
command: postgres -c 'max_connections=1000'
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${PGUSER}
|
POSTGRES_USER: ${PGUSER}
|
||||||
POSTGRES_DB: ${PGDATABASE}
|
POSTGRES_DB: ${PGDATABASE}
|
||||||
@ -108,15 +119,15 @@ services:
|
|||||||
image: minio/minio
|
image: minio/minio
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/export
|
- uploads:/export
|
||||||
|
command: server /export --console-address ":9090"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
||||||
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
||||||
command: server /export --console-address ":9090"
|
|
||||||
|
|
||||||
createbuckets:
|
createbuckets:
|
||||||
image: minio/mc
|
image: minio/mc
|
||||||
depends_on:
|
|
||||||
- plane-minio
|
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
/bin/sh -c "
|
/bin/sh -c "
|
||||||
/usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY;
|
/usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY;
|
||||||
@ -124,6 +135,10 @@ services:
|
|||||||
/usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME;
|
/usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME;
|
||||||
exit 0;
|
exit 0;
|
||||||
"
|
"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
depends_on:
|
||||||
|
- plane-minio
|
||||||
|
|
||||||
# Comment this if you already have a reverse proxy running
|
# Comment this if you already have a reverse proxy running
|
||||||
plane-proxy:
|
plane-proxy:
|
||||||
@ -131,12 +146,14 @@ services:
|
|||||||
image: makeplane/plane-proxy:latest
|
image: makeplane/plane-proxy:latest
|
||||||
ports:
|
ports:
|
||||||
- ${NGINX_PORT}:80
|
- ${NGINX_PORT}:80
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||||
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||||
depends_on:
|
depends_on:
|
||||||
- plane-web
|
- plane-web
|
||||||
- plane-api
|
- plane-api
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -10,6 +10,8 @@ services:
|
|||||||
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
|
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
|
||||||
restart: always
|
restart: always
|
||||||
command: [ "/usr/local/bin/start.sh" ]
|
command: [ "/usr/local/bin/start.sh" ]
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL}
|
||||||
NEXT_PUBLIC_GOOGLE_CLIENTID: "0"
|
NEXT_PUBLIC_GOOGLE_CLIENTID: "0"
|
||||||
@ -20,6 +22,10 @@ services:
|
|||||||
NEXT_PUBLIC_ENABLE_SENTRY: "0"
|
NEXT_PUBLIC_ENABLE_SENTRY: "0"
|
||||||
NEXT_PUBLIC_ENABLE_SESSION_RECORDER: "0"
|
NEXT_PUBLIC_ENABLE_SESSION_RECORDER: "0"
|
||||||
NEXT_PUBLIC_TRACK_EVENTS: "0"
|
NEXT_PUBLIC_TRACK_EVENTS: "0"
|
||||||
|
depends_on:
|
||||||
|
- plane-api
|
||||||
|
- plane-worker
|
||||||
|
|
||||||
|
|
||||||
plane-api:
|
plane-api:
|
||||||
container_name: planebackend
|
container_name: planebackend
|
||||||
@ -28,6 +34,8 @@ services:
|
|||||||
dockerfile: Dockerfile.api
|
dockerfile: Dockerfile.api
|
||||||
restart: always
|
restart: always
|
||||||
command: ./bin/takeoff
|
command: ./bin/takeoff
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: plane.settings.production
|
DJANGO_SETTINGS_MODULE: plane.settings.production
|
||||||
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
||||||
@ -67,6 +75,8 @@ services:
|
|||||||
dockerfile: Dockerfile.api
|
dockerfile: Dockerfile.api
|
||||||
restart: always
|
restart: always
|
||||||
command: ./bin/worker
|
command: ./bin/worker
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: plane.settings.production
|
DJANGO_SETTINGS_MODULE: plane.settings.production
|
||||||
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE}
|
||||||
@ -107,6 +117,8 @@ services:
|
|||||||
command: postgres -c 'max_connections=1000'
|
command: postgres -c 'max_connections=1000'
|
||||||
volumes:
|
volumes:
|
||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: ${PGUSER}
|
POSTGRES_USER: ${PGUSER}
|
||||||
POSTGRES_DB: ${PGDATABASE}
|
POSTGRES_DB: ${PGDATABASE}
|
||||||
@ -127,6 +139,8 @@ services:
|
|||||||
command: server /export --console-address ":9090"
|
command: server /export --console-address ":9090"
|
||||||
volumes:
|
volumes:
|
||||||
- uploads:/export
|
- uploads:/export
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID}
|
||||||
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY}
|
||||||
@ -134,7 +148,11 @@ services:
|
|||||||
createbuckets:
|
createbuckets:
|
||||||
image: minio/mc
|
image: minio/mc
|
||||||
entrypoint: >
|
entrypoint: >
|
||||||
/bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY; /usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME; /usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; "
|
/bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY;
|
||||||
|
/usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME;
|
||||||
|
/usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; "
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
depends_on:
|
depends_on:
|
||||||
- plane-minio
|
- plane-minio
|
||||||
|
|
||||||
@ -146,6 +164,8 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- ${NGINX_PORT}:80
|
- ${NGINX_PORT}:80
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
environment:
|
environment:
|
||||||
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT:-5242880}
|
||||||
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
BUCKET_NAME: ${AWS_S3_BUCKET_NAME:-uploads}
|
||||||
|
Loading…
Reference in New Issue
Block a user