feat: docker
docs: docker deployment chore: gitignore
This commit is contained in:
parent
fd6ca8b56a
commit
0a525248ac
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
docker-compose.yml
|
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
FROM golang:1.18-alpine
|
||||||
|
|
||||||
|
RUN apk add musl-dev
|
||||||
|
RUN apk add libc-dev
|
||||||
|
RUN apk add gcc
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY go.mod ./
|
||||||
|
COPY go.sum ./
|
||||||
|
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY ./ /app
|
||||||
|
|
||||||
|
RUN go build -o /anonymousoverflow
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD ["/anonymousoverflow"]
|
10
README.md
10
README.md
@ -33,3 +33,13 @@ becomes
|
|||||||
```
|
```
|
||||||
${instanceURL}/questions/43743250/using-libsodium-xchacha20-poly1305-for-large-files
|
${instanceURL}/questions/43743250/using-libsodium-xchacha20-poly1305-for-large-files
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How to deploy
|
||||||
|
|
||||||
|
AnonymousOverflow uses Docker for deployment.
|
||||||
|
|
||||||
|
Install Docker for your platform and copy the `docker-compose.example.yml` file to `docker-compose.yml`.
|
||||||
|
|
||||||
|
Then, tweak settings if needed.
|
||||||
|
|
||||||
|
Run `docker compose up -d` to build and start the container.
|
11
docker-compose.example.yml
Normal file
11
docker-compose.example.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
anonymousoverflow:
|
||||||
|
container_name: 'app'
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
network: 'host'
|
||||||
|
ports:
|
||||||
|
- '80:8080'
|
||||||
|
restart: 'always'
|
Loading…
x
Reference in New Issue
Block a user