-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adding Docker & Docker Compose (#3496)
* docs: adding Docker & Docker Compose * chore: add docker-compose
- Loading branch information
Showing
8 changed files
with
458 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Docker Compose sample .env file for Production | ||
|
||
NODE_ENV=production | ||
|
||
# set true if running inside Docker container | ||
IS_DOCKER=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Docker Compose sample .env file for Production | ||
|
||
NODE_ENV=production | ||
|
||
# set true if running inside Docker container | ||
IS_DOCKER=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Docker Compose sample .env file for Production | ||
|
||
NODE_ENV=production | ||
|
||
# set true if running inside Docker container | ||
IS_DOCKER=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
services: | ||
webapp: | ||
container_name: webapp | ||
image: ever-teams-webapp:latest | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
GAUZY_API_SERVER_URL: ${GAUZY_API_SERVER_URL:-https://api.ever.team} | ||
NEXT_PUBLIC_GAUZY_API_SERVER_URL: ${NEXT_PUBLIC_GAUZY_API_SERVER_URL:-https://api.ever.team} | ||
NODE_ENV: ${NODE_ENV:-development} | ||
DEMO: 'true' | ||
environment: | ||
GAUZY_API_SERVER_URL: ${GAUZY_API_SERVER_URL:-https://api.ever.team} | ||
NEXT_PUBLIC_GAUZY_API_SERVER_URL: ${NEXT_PUBLIC_GAUZY_API_SERVER_URL:-https://api.ever.team} | ||
NODE_ENV: ${NODE_ENV:-development} | ||
DEMO: 'true' | ||
env_file: | ||
- .env.compose | ||
restart: on-failure | ||
ports: | ||
- '3030:${UI_PORT:-3030}' | ||
networks: | ||
- overlay | ||
|
||
networks: | ||
overlay: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
services: | ||
webapp: | ||
container_name: webapp | ||
image: ghcr.io/ever-co/ever-teams-webapp:latest | ||
environment: | ||
GAUZY_API_SERVER_URL: ${GAUZY_API_SERVER_URL:-https://api.ever.team} | ||
NEXT_PUBLIC_GAUZY_API_SERVER_URL: ${NEXT_PUBLIC_GAUZY_API_SERVER_URL:-https://api.ever.team} | ||
NODE_ENV: ${NODE_ENV:-development} | ||
DEMO: 'true' | ||
env_file: | ||
- .env.demo.compose | ||
restart: on-failure | ||
ports: | ||
- '3030:${UI_PORT:-3030}' | ||
networks: | ||
- overlay | ||
|
||
networks: | ||
overlay: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,233 @@ | ||
services: | ||
db: | ||
image: postgres:15-alpine | ||
container_name: db | ||
restart: always | ||
environment: | ||
POSTGRES_DB: ${DB_NAME:-gauzy} | ||
POSTGRES_USER: ${DB_USER:-postgres} | ||
POSTGRES_PASSWORD: ${DB_PASS:-gauzy_password} | ||
healthcheck: | ||
test: | ||
[ | ||
'CMD-SHELL', | ||
'psql postgres://$${POSTGRES_USER}:$${POSTGRES_PASSWORD}@localhost:5432/$${POSTGRES_DB} || exit 1' | ||
] | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
- ./.deploy/db/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh | ||
ports: | ||
- '5432:5432' | ||
networks: | ||
- overlay | ||
|
||
zipkin: | ||
image: ghcr.io/openzipkin/zipkin-slim:latest | ||
Check warning on line 25 in docker-compose.infra.yml GitHub Actions / Cspell
|
||
container_name: zipkin | ||
# Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables | ||
environment: | ||
- STORAGE_TYPE=mem | ||
# Uncomment to enable self-tracing | ||
# - SELF_TRACING_ENABLED=true | ||
# Uncomment to increase heap size | ||
# - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError | ||
ports: | ||
# Port used for the Zipkin UI and HTTP Api | ||
- 9411:9411 | ||
networks: | ||
- overlay | ||
|
||
cube: | ||
image: cubejs/cube:latest | ||
container_name: cube | ||
ports: | ||
- '4000:4000' # Cube Playground | ||
- '5430:5430' # Port for Cube SQL | ||
environment: | ||
CUBEJS_DEV_MODE: 'true' | ||
CUBEJS_DB_TYPE: postgres | ||
CUBEJS_DB_HOST: db | ||
CUBEJS_DB_PORT: 5432 | ||
CUBEJS_DB_NAME: ${DB_NAME:-gauzy} | ||
CUBEJS_DB_USER: ${DB_USER:-postgres} | ||
CUBEJS_DB_PASS: ${DB_PASS:-gauzy_password} | ||
# Credentials to connect to Cube SQL APIs | ||
CUBEJS_PG_SQL_PORT: 5430 | ||
CUBEJS_SQL_USER: ${CUBE_USER:-cube_user} | ||
CUBEJS_SQL_PASSWORD: ${CUBE_PASS:-cube_pass} | ||
volumes: | ||
- 'cube_data:/cube/conf' | ||
links: | ||
- db | ||
networks: | ||
- overlay | ||
|
||
jitsu: | ||
container_name: jitsu | ||
image: jitsucom/jitsu:latest | ||
extra_hosts: | ||
- 'host.docker.internal:host-gateway' | ||
environment: | ||
- REDIS_URL=redis://redis:6379 | ||
# Retroactive users recognition can affect RAM significant. | ||
# Read more about the solution https://jitsu.com/docs/other-features/retroactive-user-recognition | ||
- USER_RECOGNITION_ENABLED=true | ||
- USER_RECOGNITION_REDIS_URL=redis://jitsu_redis_users_recognition:6380 | ||
- TERM=xterm-256color | ||
depends_on: | ||
redis: | ||
condition: service_healthy | ||
jitsu_redis_users_recognition: | ||
condition: service_healthy | ||
volumes: | ||
- ./.deploy/jitsu/configurator/data/logs:/home/configurator/data/logs | ||
- ./.deploy/jitsu/server/data/logs:/home/eventnative/data/logs | ||
- ./.deploy/jitsu/server/data/logs/events:/home/eventnative/data/logs/events | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- jitsu_workspace:/home/eventnative/data/airbyte | ||
restart: always | ||
ports: | ||
- '8000:8000' | ||
networks: | ||
- overlay | ||
|
||
elasticsearch: | ||
image: 'elasticsearch:7.17.7' | ||
container_name: elasticsearch | ||
volumes: | ||
- elasticsearch_data:/usr/share/elasticsearch/data | ||
environment: | ||
ES_JAVA_OPTS: -Xms512m -Xmx1024m | ||
discovery.type: single-node | ||
http.port: 9200 | ||
http.cors.enabled: 'true' | ||
http.cors.allow-origin: http://localhost:3000,http://127.0.0.1:3000,http://localhost:1358,http://127.0.0.1:1358 | ||
http.cors.allow-headers: X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization | ||
http.cors.allow-credentials: 'true' | ||
bootstrap.memory_lock: 'true' | ||
xpack.security.enabled: 'false' | ||
ports: | ||
- '9200' | ||
- '9300' | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
healthcheck: | ||
test: ['CMD', 'curl', '-f', 'http://localhost:9200/_cat/health'] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 10 | ||
start_period: 20s | ||
networks: | ||
- overlay | ||
|
||
# Elasticsearch Management UI | ||
dejavu: | ||
image: appbaseio/dejavu:3.6.0 | ||
container_name: dejavu | ||
ports: | ||
- '1358:1358' | ||
links: | ||
- elasticsearch | ||
networks: | ||
- overlay | ||
|
||
# TODO: For now used in Jitsu, but we will need to create another one dedicated for Jitsu later | ||
redis: | ||
image: 'redis:7.0.2-alpine' | ||
container_name: redis | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ['CMD-SHELL', 'redis-cli -h localhost -p 6379 PING'] | ||
interval: 1s | ||
timeout: 30s | ||
ports: | ||
- '6379' | ||
volumes: | ||
- ./.deploy/redis/data:/data | ||
networks: | ||
- overlay | ||
|
||
jitsu_redis_users_recognition: | ||
image: 'redis:7.0.2-alpine' | ||
container_name: jitsu_redis_users_recognition | ||
command: redis-server /usr/local/etc/redis/redis.conf | ||
restart: unless-stopped | ||
healthcheck: | ||
test: ['CMD-SHELL', 'redis-cli -h localhost -p 6380 PING'] | ||
interval: 1s | ||
timeout: 30s | ||
ports: | ||
- '6380' | ||
volumes: | ||
- ./.deploy/redis/jitsu_users_recognition/data:/data | ||
- ./.deploy/redis/jitsu_users_recognition/redis.conf:/usr/local/etc/redis/redis.conf | ||
networks: | ||
- overlay | ||
|
||
minio: | ||
restart: unless-stopped | ||
image: quay.io/minio/minio:latest | ||
container_name: minio | ||
volumes: | ||
- minio_data:/data | ||
environment: | ||
MINIO_ROOT_USER: ever-gauzy-access-key | ||
MINIO_ROOT_PASSWORD: ever-gauzy-secret-key | ||
command: server /data --address :9000 --console-address ":9001" | ||
ports: | ||
- 9000:9000 | ||
- 9001:9001 | ||
networks: | ||
- overlay | ||
|
||
minio_create_buckets: | ||
image: minio/mc | ||
environment: | ||
MINIO_ROOT_USER: ever-gauzy-access-key | ||
MINIO_ROOT_PASSWORD: ever-gauzy-secret-key | ||
entrypoint: | ||
- '/bin/sh' | ||
- '-c' | ||
command: | ||
- "until (/usr/bin/mc alias set minio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD) do | ||
echo 'Waiting to start minio...' && sleep 1; | ||
done; | ||
/usr/bin/mc mb minio/ever-gauzy --region=eu-north-1; | ||
exit 0;" | ||
depends_on: | ||
- minio | ||
networks: | ||
- overlay | ||
|
||
pgweb: | ||
image: sosedoff/pgweb | ||
container_name: pgweb | ||
restart: always | ||
depends_on: | ||
- db | ||
links: | ||
- db:${DB_HOST:-db} | ||
environment: | ||
POSTGRES_DB: ${DB_NAME:-gauzy} | ||
POSTGRES_USER: ${DB_USER:-postgres} | ||
POSTGRES_PASSWORD: ${DB_PASS:-gauzy_password} | ||
PGWEB_DATABASE_URL: postgres://${DB_USER:-postgres}:${DB_PASS:-gauzy_password}@${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-gauzy}?sslmode=disable | ||
ports: | ||
- '8081:8081' | ||
networks: | ||
- overlay | ||
|
||
volumes: | ||
postgres_data: {} | ||
redis_data: {} | ||
elasticsearch_data: {} | ||
minio_data: {} | ||
cube_data: {} | ||
certificates: {} | ||
jitsu_workspace: {} | ||
|
||
networks: | ||
overlay: | ||
driver: bridge |
Oops, something went wrong.