- name: Create database ansible.builtin.include_role: role: app/database vars: app_name: "maxun" - name: Deploy maxun backend community.docker.docker_container: name: maxun-backend image: getmaxun/maxun-backend:v0.0.18 state: started restart_policy: unless-stopped ports: - "{{ backend_port }}:{{ backend_port }}" env: URL: "{{ backend_url }}" PLAYWRIGHT_BROWSERS_PATH: "/ms-playwright" PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "0" CHROMIUM_FLAGS: "'--disable-gpu --no-sandbox --headless=new'" # Adapted from the example .env NODE_ENV: "production" JWT_SECRET: "{{ maxun.jwt_secret }}" DB_NAME: "maxun" DB_USER: "maxun" DB_PASSWORD: "password" DB_HOST: "{{ pg_host }}" DB_PORT: "{{ pg_port | string }}" ENCRYPTION_KEY: "{{ maxun.app_key }}" SESSION_SECRET: "{{ maxun.session_secret }}" MINIO_ENDPOINT: "{{ lookup('hostip', 'prod_services') }}" MINIO_PORT: "5002" MINIO_CONSOLE_PORT: "5001" MINIO_ACCESS_KEY: "K8YFuQFhUm8i7F9KuAMy" MINIO_SECRET_KEY: "Vw9MGxOQWe3MaBjTBnqK8VxL1YGwQxEgLC1A6ZwO" REDIS_HOST: "{{ lookup('hostip', 'prod_services') }}" REDIS_PORT: "6379" REDIS_PASSWORD: "" # Backend and Frontend URLs and Ports BACKEND_PORT: "{{ backend_port | string }}" # Port to run backend on. Needed for Docker setup FRONTEND_PORT: "{{ frontend_port | string }}" # Port to run frontend on. Needed for Docker setup VITE_BACKEND_URL: "{{ backend_url }}" VITE_PUBLIC_URL: "{{ frontend_url }}" MAXUN_TELEMETRY: "false" security_opts: - seccomp=unconfined shm_size: "2G" memory_reservation: "2G" volumes: - "/var/run/dbus:/var/run/dbus" - name: Deploy maxun front end community.docker.docker_container: name: maxun-frontend image: getmaxun/maxun-frontend:v0.0.18 state: started ports: - "{{ frontend_port }}:5173" env: PUBLIC_URL: "{{ frontend_url }}" BACKEND_URL: "{{ backend_url }}" NODE_ENV: "production" MAXUN_TELEMETRY: "false" BACKEND_PORT: "{{ backend_port | string }}" # Port to run backend on. Needed for Docker setup FRONTEND_PORT: "{{ frontend_port | string }}" # Port to run frontend on. Needed for Docker setup VITE_BACKEND_URL: "{{ backend_url }}" VITE_PUBLIC_URL: "{{ frontend_url }}"