add docker file

This commit is contained in:
wagslane
2023-06-06 14:58:36 -06:00
parent 54f294659f
commit 2b5e5bedee
3 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
out
.env
learn-cicd-starter
notely

5
Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM --platform=linux/amd64 debian:stretch-slim
ADD notely /usr/bin/notely
CMD ["notely"]

View File

@@ -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: