forked from mageddo/dns-proxy-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (58 loc) · 1.85 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: '2'
services:
# Base Image to build project
compiler-dps:
image: golang:1.11
working_dir: /app/src/github.com/mageddo/dns-proxy-server
volumes:
- $PWD:/app/src/github.com/mageddo/dns-proxy-server
- $PWD/builder.bash:/bin/builder.bash
- /var/run/docker.sock:/var/run/docker.sock
command: tail -f /dev/null
environment:
- TERM=xterm
- GOPATH=/app
- MG_WORK_DIR=/app/src/github.com/mageddo/dns-proxy-server
hostname: dns-proxy-server.dev
network_mode: bridge
# Run from docker image
prod-dps:
image: defreitas/dns-proxy-server:2.10.4
hostname: dns.mageddo
volumes:
- /opt/dns-proxy-server/conf:/app/conf
- /var/run/docker.sock:/var/run/docker.sock
- /etc/resolv.conf:/etc/resolv.conf
ports:
- 5380:5380
network_mode: bridge
# Build the project and generate binary at build folder
prod-build-binary-dps:
extends: compiler-dps
command: bash -c "builder.bash build"
# Build project and generate docker image you will need to run prod-build-binary-dps first
prod-build-image-dps:
build:
context: .
dockerfile: Dockerfile
image: defreitas/dns-proxy-server:2.10.4
prod-build-image-dps-arm7x86:
build:
context: .
dockerfile: Dockerfile.arm7x86
image: defreitas/dns-proxy-server:2.10.4-arm7x86
prod-build-image-dps-arm8x64:
build:
context: .
dockerfile: Dockerfile.arm8x64
image: defreitas/dns-proxy-server:2.10.4-arm8x64
# build the project and make the github release
prod-ci-deploy:
container_name: prod-ci-deploy
extends: compiler-dps
command: bash -c "builder.bash release"
environment:
- CURRENT_BRANCH=$TRAVIS_BRANCH # current branch name
- REPO_TOKEN=$REPO_TOKEN # github token to deploy the binary
volumes:
- $HOME/.gitconfig:/root/.gitconfig