Skip to content

Commit

Permalink
add docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
wagslane committed Jun 6, 2023
1 parent 54f2946 commit 2b5e5be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
out
.env
learn-cicd-starter
notely
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM --platform=linux/amd64 debian:stretch-slim

ADD notely /usr/bin/notely

CMD ["notely"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 2b5e5be

Please sign in to comment.