mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 10:19:09 +00:00 
			
		
		
		
	web-app-chess: refactor runtime & entrypoint
- Move entrypoint to files/ and deploy via copy - Parameterize APP_KEY_FILE, data dir, and entrypoint paths - Require explicit PORT/PG envs (remove fallbacks) - Drop stray header from config/main.yml - Dockerfile: use templated data dir & entrypoint; keep node user - Compose: set custom image, adjust volume mapping - env: derive APP_SCHEME from WEB_PROTOCOL; NODE_ENV from ENVIRONMENT - tasks: add 01_core and simplify main to include it Ref: https://chatgpt.com/share/68b851c5-4dd8-800f-8e9e-22b985597b8f
This commit is contained in:
		| @@ -1,17 +1,20 @@ | ||||
| # General | ||||
| application_id:                 "web-app-chess" | ||||
| database_type:                  "postgres" | ||||
|  | ||||
| # Container | ||||
| container_port:                 5080 | ||||
| container_hostname:             "{{ domains | get_domain(application_id) }}" | ||||
|  | ||||
| # App URLs & meta | ||||
| #CHESS_URL:                      "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" | ||||
| # CHESS_URL:                      "{{ domains | get_url(application_id, WEB_PROTOCOL) }}" | ||||
| CHESS_HOSTNAME:                 "{{ container_hostname }}" | ||||
| CHESS_ADMIN_URL:                "" | ||||
| CHESS_ADMIN_EMAIL:              "" | ||||
| CHESS_ADMIN_EMAIL:              "{{ users.users.administrator.email }}" | ||||
|  | ||||
| # Docker image | ||||
| #CHESS_IMAGE:                    "{{ applications | get_app_conf(application_id, 'docker.services.application.image') }}" | ||||
| CHESS_CUSTOM_IMAGE:             "castling_custom" | ||||
| CHESS_VERSION:                  "{{ applications | get_app_conf(application_id, 'docker.services.application.version') }}" | ||||
| CHESS_CONTAINER:                "{{ applications | get_app_conf(application_id, 'docker.services.application.name') }}" | ||||
| CHESS_DATA_VOLUME:              "{{ applications | get_app_conf(application_id, 'docker.volumes.data') }}" | ||||
| @@ -23,3 +26,10 @@ CHESS_REPO_REF:                 "{{ applications | get_app_conf(application_id, | ||||
| # Security | ||||
| CHESS_HMAC_SECRET:              "{{ lookup('password', '/dev/null length=63 chars=ascii_letters,digits') }}" | ||||
| CHESS_KEY_FILENAME:             "signing-key" | ||||
| CHESS_APP_DATA_DIR:             '/app/data' | ||||
| CHESS_APP_KEY_FILE:             "{{ [ CHESS_APP_DATA_DIR, CHESS_KEY_FILENAME ] | path_join }}" | ||||
|  | ||||
| CHESS_ENTRYPOINT_FILE:          "docker-entrypoint.sh" | ||||
| CHESS_ENTRYPOINT_REL:           "{{ CHESS_ENTRYPOINT_FILE }}" | ||||
| CHESS_ENTRYPOINT_ABS:           "{{ [docker_compose.directories.instance, CHESS_ENTRYPOINT_REL] | path_join }}" | ||||
| CHESS_ENTRYPOINT_INT:           "{{ ['/usr/local/bin', CHESS_ENTRYPOINT_FILE] | path_join }}" | ||||
		Reference in New Issue
	
	Block a user