From a5a2ac009770645c8e904f8b5e101b79d95b4f2d Mon Sep 17 00:00:00 2001 From: schererleander Date: Wed, 2 Jul 2025 22:17:24 +0200 Subject: feat: environment and deployment setup --- .gitignore | 40 ++++++++++++++++++++++++++++++++++++ docker-compose.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f02f8f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/versions + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f81adf3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,60 @@ +services: + mongodb: + image: mongo:7.0 + container_name: mongodb + ports: + - "27017:27017" + environment: + MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME} + MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD} + MONGO_INITDB_DATABASE: ${MONGO_INITDB_DATABASE} + volumes: + - mongodb_data:/data/db + restart: unless-stopped + healthcheck: + test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"] + interval: 30s + timeout: 10s + retries: 3 + + minio: + image: minio/minio:latest + container_name: minio + ports: + - "9000:9000" # API + - "9001:9001" # Web Console + environment: + MINIO_ROOT_USER: ${MINIO_ROOT_USER} + MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD} + volumes: + - minio_data:/data + command: server /data --console-address ":9001" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] + interval: 30s + timeout: 20s + retries: 3 + restart: unless-stopped + + minio-init: + image: minio/mc:latest + container_name: minio-init + depends_on: + minio: + condition: service_healthy + environment: + MINIO_ROOT_USER: ${MINIO_ROOT_USER} + MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD} + entrypoint: > + /bin/sh -c " + mc alias set minio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD && + mc mb minio/storage --ignore-existing && + echo '\033[32m✓ Bucket storage created successfully\033[0m' + " + restart: "no" + +volumes: + mongodb_data: + driver: local + minio_data: + driver: local -- cgit v1.3.1