diff --git a/.gitignore b/.gitignore index 2eea525..1d96b39 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -.env \ No newline at end of file +.env +build/ci/.env +butler +build/ci/butler diff --git a/README.md b/README.md index cb3aecf..751ba3e 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,9 @@ POSTGRES_URL_CONNECT=postgresql://user:password@hos:port/db?sslmode=disable ```sh go run cmd/butler/main.go ``` + +### Сборка + +```sh +GOOS=linux GOARCH=arm go build -o butler cmd/butler/main.go +``` diff --git a/build/ci/Dockerfile b/build/ci/Dockerfile index a802427..3d3f8d1 100644 --- a/build/ci/Dockerfile +++ b/build/ci/Dockerfile @@ -1,3 +1,4 @@ FROM scratch COPY butler / -CMD [ "./butler" ] +COPY .env / +CMD [ "/butler" ] diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml new file mode 100644 index 0000000..a1d06e8 --- /dev/null +++ b/deploy/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.3" + +services: + + butler: + container_name: butler + build: + context: ../build/ci + dockerfile: Dockerfile + command: /butler