From 2b5e5bedee1d0cab45caab3c189ed65e94763ea1 Mon Sep 17 00:00:00 2001 From: wagslane Date: Tue, 6 Jun 2023 14:58:36 -0600 Subject: [PATCH] add docker file --- .gitignore | 1 + Dockerfile | 5 +++++ README.md | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index c929cc3..2092f54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ out .env learn-cicd-starter +notely diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..898d270 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM --platform=linux/amd64 debian:stretch-slim + +ADD notely /usr/bin/notely + +CMD ["notely"] diff --git a/README.md b/README.md index d9e6724..c900296 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ PORT="8000" Run the server: ```bash -go build -o out && ./out +go build -o notely && ./notely ``` *This starts the server in non-database mode.* It will serve a webpage at `http://localhost:8000`. However, you won't be able to interact with the webpage until you connect it to a MySQL database and run the migrations. @@ -47,7 +47,7 @@ Then run the migrations: Start the server: ```bash -go build -o out && ./out +go build -o notely && ./notely ``` Because the `DATABASE_URL` environment variable is set, the server will connect to the database and serve the webpage at `http://localhost:8000`. The page should be fully functional now. You can: