# compose.dev.yaml # Docker Compose para entorno de desarrollo. services: app: image: node:20-bookworm working_dir: /app user: "${UID:-1000}:${GID:-1000}" volumes: - ./services/app:/app:rw - ./services/app/node_modules:/app/node_modules env_file: - ./services/app/.env.development environment: NODE_ENV: development # <- fuerza el entorno para que el loader tome .env.development expose: - ${APP_PORT} networks: net: aliases: [dev-app] command: npm run dev auth: image: node:20-bookworm working_dir: /app user: "${UID:-1000}:${GID:-1000}" volumes: - ./services/auth:/app:rw - ./services/auth/node_modules:/app/node_modules env_file: - ./services/auth/.env.development environment: NODE_ENV: development # <- fuerza el entorno para que el loader tome .env.development expose: - ${AUTH_PORT} networks: net: aliases: [dev-auth] command: npm run dev db: image: postgres:16 environment: POSTGRES_DB: ${DB_NAME} POSTGRES_USER: ${DB_USER} POSTGRES_PASSWORD: ${DB_PASS} volumes: - suitecoffee-db:/var/lib/postgresql/data networks: net: aliases: [dev-db] tenants: image: postgres:16 environment: POSTGRES_DB: ${TENANTS_DB_NAME} POSTGRES_USER: ${TENANTS_DB_USER} POSTGRES_PASSWORD: ${TENANTS_DB_PASS} volumes: - tenants-db:/var/lib/postgresql/data networks: net: aliases: [dev-tenants] ################# ### Authentik ### ################# ak-db: image: docker.io/library/postgres:16-alpine env_file: - .env.development environment: POSTGRES_DB: ${PG_DB:-authentik} POSTGRES_PASSWORD: ${PG_PASS:?database password required} POSTGRES_USER: ${PG_USER:-authentik} volumes: - authentik-db:/var/lib/postgresql/data networks: net: aliases: [dev-ak-db] ak-redis: image: docker.io/library/redis:alpine command: --save 60 1 --loglevel warning networks: net: aliases: [dev-ak-redis] volumes: - ak-redis:/data ak: image: ghcr.io/goauthentik/server:latest env_file: - .env.development command: server environment: AUTHENTIK_SECRET_KEY: "Timothy-Yearning-Unzip-Playmate3-Snowiness-Desecrate" AUTHENTIK_DEBUG: false AUTHENTIK_POSTGRESQL__HOST: ak-db AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_REDIS__HOST: ak-redis AUTHENTIK_BOOTSTRAP_PASSWORD: Succulent-Sanded7 AUTHENTIK_BOOTSTRAP_EMAIL: info.suitecoffee@gmail.com AUTHENTIK_HTTP__TRUSTED_PROXY__CIDRS: "0.0.0.0/0,::/0" AUTHENTIK_SECURITY__CSRF_TRUSTED_ORIGINS: "https://authentik.suitecoffee.mateosaldain.uy,https://suitecoffee.mateosaldain.uy,https://sso.suitecoffee.uy,https://suitecoffee.uy" AUTHENTIK_COOKIE__DOMAIN: sso.suitecoffee.uy networks: net: aliases: [dev-authentik] volumes: - ./media:/media - ./custom-templates:/templates ak-worker: image: ghcr.io/goauthentik/server:latest command: worker environment: AUTHENTIK_POSTGRESQL__HOST: ak-db AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik} AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_REDIS__HOST: ak-redis AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY:?secret key required} AUTHENTIK_HTTP__TRUSTED_PROXY__CIDRS: "0.0.0.0/0,::/0" AUTHENTIK_SECURITY__CSRF_TRUSTED_ORIGINS: "https://authentik.suitecoffee.mateosaldain.uy,https://suitecoffee.mateosaldain.uy,https://sso.suitecoffee.uy,https://suitecoffee.uy" AUTHENTIK_COOKIE__DOMAIN: "sso.suitecoffee.uy" networks: net: aliases: [dev-ak-work] user: root volumes: - /var/run/docker.sock:/var/run/docker.sock - ./media:/media - ./certs:/certs - ./custom-templates:/templates volumes: tenants-db: suitecoffee-db: authentik-db: ak-redis: networks: net: driver: bridge