{"id":15172746,"url":"https://github.com/fritzthecat9/dockercomposetest","last_synced_at":"2026-01-26T02:03:16.475Z","repository":{"id":235891334,"uuid":"791470589","full_name":"FritzTheCat9/DockerComposeTest","owner":"FritzTheCat9","description":"Deploy two C# web APIs to Raspberry Pi with Docker Compose file","archived":false,"fork":false,"pushed_at":"2024-04-27T12:47:41.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-19T21:22:13.803Z","etag":null,"topics":["api","c-sharp","csharp","docker","docker-compose","http","https","minimal-api","raspberry-pi","raspberry-pi-4","raspberry-pi4"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FritzTheCat9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-24T19:22:15.000Z","updated_at":"2024-04-27T12:47:44.000Z","dependencies_parsed_at":"2024-04-27T14:08:15.747Z","dependency_job_id":null,"html_url":"https://github.com/FritzTheCat9/DockerComposeTest","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"cc426dc0e3b4fa9a0373c84eebbfc494894950aa"},"previous_names":["fritzthecat9/dockercomposetest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FritzTheCat9/DockerComposeTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FritzTheCat9%2FDockerComposeTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FritzTheCat9%2FDockerComposeTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FritzTheCat9%2FDockerComposeTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FritzTheCat9%2FDockerComposeTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FritzTheCat9","download_url":"https://codeload.github.com/FritzTheCat9/DockerComposeTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FritzTheCat9%2FDockerComposeTest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28764423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T00:37:26.264Z","status":"online","status_checked_at":"2026-01-26T02:00:08.215Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","c-sharp","csharp","docker","docker-compose","http","https","minimal-api","raspberry-pi","raspberry-pi-4","raspberry-pi4"],"created_at":"2024-09-27T10:04:12.376Z","updated_at":"2026-01-26T02:03:16.451Z","avatar_url":"https://github.com/FritzTheCat9.png","language":"Dockerfile","readme":"### Docker compose:\nThis repository contains two C# web APIs served in single docker-compose file.\\\nYou can run this two APIs on docker on windows with windows environment varaibles: \"windows.env\".\\\nYou can run this two APIs on docker on Raspberry Pi with linux environment varaibles: \"linux.env\".\n\nThe README.md file contains commands that will allow you to:\n- create images of your APIs depending on picked system and environment variables\n- add the images to the docker hub platform\n- download the images to the Linux (Raspberry Pi) / Windows\n- run the all APIs containers on the Linux (Raspberry Pi) / Windows\n\n### Api 1 (dockercomposetest_api):\n```\nhttp://localhost:5000\nhttps://localhost:5001\n```\n### Api 1 (dockercomposetest_api2):\n```\nhttp://localhost:5002\nhttps://localhost:5003\n```\n### Working certs (generate certificates then copy to raspberry pi, for https):\n```\ndotnet dev-certs https --clean\ndotnet dev-certs https -ep $HOME\\.aspnet\\https\\aspnetapp.pfx -p password\ndotnet dev-certs https --trust\n-ep - path to existing certificate file (.pfx) that you want to use for HTTPS development (existing PFX file)\n```\n##### IMPORTANT - COPY CERTIFICATE TO RASPBERRY PI!!! (use scp) -\u003e to: $HOME/.aspnet/https (change \u003craspberrypi_ip\u003e to correct Raspberry Pi ip)\n```\nscp C:\\Users\\bartl\\.aspnet\\https\\aspnetapp.pfx malinka@\u003craspberrypi_ip\u003e:/home/malinka/Desktop\nssh malinka@\u003craspberrypi_ip\u003e\nsudo mv /home/malinka/Desktop/aspnetapp.pfx /home/malinka/.aspnet/https\n```\n### Build and up all containers (change environment variables depending on system You want to use):\n```\ndocker-compose --env-file linux.env up -d --build\ndocker-compose --env-file windows.env up -d --build\n--env-file - environment variables (other for different configuration / system)\n-d - detached mode (services in the background, without blocking the command prompt)\n--build - rebuild the docker images\n```\n### Docker compose up (create and start all containers)\n```\ndocker-compose --env-file linux.env up -d\ndocker-compose --env-file windows.env up -d\n```\n### Stop / start Docker compose (only start or stop all containers)\n```\ndocker-compose --env-file linux.env stop\ndocker-compose --env-file linux.env start\ndocker-compose --env-file windows.env stop\ndocker-compose --env-file windows.env start\n```\n### Docker compose down (stop and remove all containers)\n```\ndocker-compose --env-file linux.env down\ndocker-compose --env-file windows.env down\n```\n### Docker compose push (push all containers to docker hub)\n```\ndocker-compose --env-file linux.env push\ndocker-compose --env-file windows.env push\n```\n### Install Docker Compose on Raspberry Pi:\n```\nsudo apt install docker-compose\n```\n### Copy files to Raspberry Pi (change \u003craspberrypi_ip\u003e to correct Raspberry Pi ip)\n- Copy \"docker-compose.yml\" file to Raspberry Pi (using scp)\n- Copy \"linux.env\" file to Raspberry Pi (using scp)\n```\nscp C:\\Users\\bartl\\source\\repos\\DockerComposeTest\\docker-compose.yml malinka@\u003craspberrypi_ip\u003e:/home/malinka/Desktop/\nscp C:\\Users\\bartl\\source\\repos\\DockerComposeTest\\linux.env malinka@\u003craspberrypi_ip\u003e:/home/malinka/Desktop/\n```\n### Pull and run Docker Compose on Rapberry Pi / Windows:\n```\ndocker-compose --env-file linux.env pull\ndocker-compose --env-file linux.env up -d\ndocker-compose --env-file windows.env pull\ndocker-compose --env-file windows.env up -d\n```\n### Check docker images and containers:\n```\ndocker images\ndocker ps -a\n```\n### Test Apis:\n```\ncurl http://localhost:5000/api\ncurl -k https://localhost:5001/api\ncurl http://localhost:5002/api\ncurl -k https://localhost:5003/api\n-k - ignore certificate check\n```\n### Pull only single image if needed\n```\ndocker pull fritzthecat9/dockercomposetest_api:LINUX\ndocker pull fritzthecat9/dockercomposetest_api2:LINUX\ndocker pull fritzthecat9/dockercomposetest_api:WINDOWS\ndocker pull fritzthecat9/dockercomposetest_api2:WINDOWS\n```\n### Container logs\n```\ndocker logs container_name_or_id\n-f - continuously follow or stream the logs generated by a Docker container\ndocker logs -f container_name_or_id\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritzthecat9%2Fdockercomposetest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffritzthecat9%2Fdockercomposetest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritzthecat9%2Fdockercomposetest/lists"}