From aa4b93fb0a313b556e3f56e75d32a53ff73868e8 Mon Sep 17 00:00:00 2001 From: Diego Cornejo Date: Sun, 15 Sep 2024 23:29:50 -0600 Subject: [PATCH 1/2] feat: Added server as a submodule under ./server and created docker-compose-with-server.yml to include server service. --- .gitmodules | 3 +++ README.md | 19 +++++++++++++++++++ docker-compose-with-server.yml | 5 +++++ docker-compose.yml | 3 +-- server | 1 + 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 100644 docker-compose-with-server.yml create mode 160000 server diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0d466fc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "server"] + path = server + url = https://github.com/diegofcornejo/EDOpro-server-ts diff --git a/README.md b/README.md index a5eed9e..1d7eafa 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,22 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + +## Docker Compose +You need to compose the Docker image passing `--env-file .env` used for build arguments in the Dockerfile. + +### Just web +```bash +docker compose --env-file .env build --progress plain +# Load env file here is important to pass the build arguments to the Dockerfile from the .env file. + +docker compose up +# No need to pass the .env file again, since the environment variables are already defined in the docker-compose.yml, and they will be available during execution. +``` + +### With server +```bash +docker compose -f docker-compose-with-server.yml --env-file .env build --progress plain +docker compose -f docker-compose-with-server.yml up +``` + diff --git a/docker-compose-with-server.yml b/docker-compose-with-server.yml new file mode 100644 index 0000000..f9eff2e --- /dev/null +++ b/docker-compose-with-server.yml @@ -0,0 +1,5 @@ +name: evolutionygo + +include: + - path: ./docker-compose.yml + - path: ./server/docker-compose.yaml \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0b23a61..73dbc00 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ -version: '3.8' -name: evolutionygo +name: evolutionygo-web services: web: restart: always diff --git a/server b/server new file mode 160000 index 0000000..2ad3534 --- /dev/null +++ b/server @@ -0,0 +1 @@ +Subproject commit 2ad3534b6d3630234eaebb3e17889ea26db18b5f From a8acdcd0c22e7ab87087755185f7376a8ae120cb Mon Sep 17 00:00:00 2001 From: Diego Cornejo Date: Sun, 15 Sep 2024 23:51:41 -0600 Subject: [PATCH 2/2] fix: Added server path to vercelignore --- .vercelignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .vercelignore diff --git a/.vercelignore b/.vercelignore new file mode 100644 index 0000000..13cd1fa --- /dev/null +++ b/.vercelignore @@ -0,0 +1 @@ +server \ No newline at end of file