{"id":21006271,"url":"https://github.com/derlin/docker-wed","last_synced_at":"2025-06-22T16:37:49.572Z","repository":{"id":27006880,"uuid":"30470977","full_name":"derlin/docker-wed","owner":"derlin","description":"docker container with glassfish to run the sample wedding-site app","archived":false,"fork":false,"pushed_at":"2015-02-08T15:28:22.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T10:31:08.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/derlin.png","metadata":{"files":{"readme":"README.md","changelog":"change_admin_pass.expect","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-07T21:32:56.000Z","updated_at":"2024-06-22T02:46:17.000Z","dependencies_parsed_at":"2022-08-31T19:30:17.782Z","dependency_job_id":null,"html_url":"https://github.com/derlin/docker-wed","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fdocker-wed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fdocker-wed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fdocker-wed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derlin%2Fdocker-wed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derlin","download_url":"https://codeload.github.com/derlin/docker-wed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243428421,"owners_count":20289315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-19T08:50:28.941Z","updated_at":"2025-03-13T14:43:42.228Z","avatar_url":"https://github.com/derlin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Mini-projet de Systèmes d'informations (3e année, janvier 2015)\n\n\nLe container inclut un Glassfish faisant tourner un war (WeddingSiteApp.war). \nLe site comprend:\n- single site avec Angularjs pour faire des cadeaux de mariage et laisser un commentaire dans le guest book \n- single admin page pour gérer les cadeaux\n\nLe tout avec un service REST et JPA côté serveur.\n\n### Pour utiliser le container\nLancer le container:\n    \n    docker run  \\\n         -v path/to/war/folder:/opt/oracle/glassfish4/glassfish/domains/domain1/autodeploy/  \\\n         -v path/to/datasources:/opt/oracle/glassfish4/glassfish/databases/ \\\n        -p 8080:8080 -p 1527:1527 -p 4848:4848 \\\n         derlin/wed-live:latest\n\nAjouter __-d__ pour le lancer en daemon.\n\nPour ensuite ouvrir un shell:\n\n    docker ps\n    docker exec -ti \u003ccontainer id\u003e bash\n\n### pour l'autodeploy avec netbeans\n\nIn `project.properties` file must add a reference for your end folder:\n    \n    war.custom.dir=/path/to/war/folder/\n\nThen, in your `build.xml` file should add this chunk of code: \n\n    \u003ctarget name=“-post-dist”\u003e \n        \u003cecho message=“Copy .war file to my custom folder”/\u003e \n        \u003ccopy file=“${dist.war}” todir=“${war.custom.dir}” /\u003e \n    \u003c/target\u003e\n\nNote: don't use the default dist folder, since it is removed/recreated on each build !\n\n### using a data-container for the databases\n\n__Create the container__\n\nFirst, create and run a data only container. For this, either use a Dockerfile or simply use a run command.\nWith a dockerfile:\n\n    # Dockerfile\n    FROM busybox\n    VOLUME /opt/oracle/glassfish4/glassfish/databases/\n    CMD /bin/sh\n\nand then:\n\n    docker build -t user/db_store .\n\nWith a run command:\n\n    docker run -ti -v /opt/oracle/glassfish4/glassfish/databases --name db_store busybox /bin/sh\n\n__Use the container__\n\nBuild the wed-live image, commit, and relaunch it with:\n\n    docker run \\     \n        --volumes-from db_store \\\n        -p 8080:8080 -p 1527:1527 -p 4848:4848 \\\n        derlin/test\n\n__Backup and restore databases__\n\nBackup:\n\n    docker run --volumes-from db_store -v $(pwd):/backup busybox \\\n        cd /opt/oracle/glassfish4/glassfish/databases \u0026\u0026 tar czvf /backup/backup.tar.gz .\n\nRestore it in a new container:\n\n    docker run -ti -v /opt/oracle/glassfish4/glassfish/databases --name db_store2 busybox /bin/sh\n    docker run --volumes-from db_store2 -v $(pwd):/backup busybox \\\n        cd /opt/oracle/glassfish4/glassfish/databases \u0026\u0026 tar xzvf /backup/backup.tar.gz \n    \nSome really nice articles about docker volumes are available here: \n* https://docs.docker.com/userguide/dockervolumes/\n* http://www.tech-d.net/2013/12/16/persistent-volumes-with-docker-container-as-volume-pattern/\n* http://crosbymichael.com/advanced-docker-volumes.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderlin%2Fdocker-wed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderlin%2Fdocker-wed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderlin%2Fdocker-wed/lists"}