forked from mageddo/dns-proxy-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
91 lines (81 loc) · 2.19 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '2.3'
services:
# Base Image to build project
compiler-dps:
build:
context: .
dockerfile: Dockerfile.builder
volumes:
- ./:/app/src/github.com/mageddo/dns-proxy-server
- /var/run/docker.sock:/var/run/docker.sock
environment:
- TERM=xterm
networks:
- dps_bridge
- dps
command: tail -f /dev/null
# Compile the project and run the tests
tests:
build:
context: .
dockerfile: Dockerfile.go.builder
target: GOLANG
volumes:
- ./:/app/src/github.com/mageddo/dns-proxy-server
command: bash -c "builder.bash assemble"
app-dps:
image: node:12-alpine
volumes:
- ./app:/app
working_dir: /app
networks:
- dps_bridge
- dps
ports:
- 5381:3000
command: tail -f /dev/null
links:
- compiler-dps
# Run from docker image
prod-dps:
image: defreitas/dns-proxy-server:2.19.0
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
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.19.0
prod-build-image-dps-arm7x86:
build:
context: .
dockerfile: Dockerfile.arm7x86
image: defreitas/dns-proxy-server:2.19.0-arm7x86
prod-build-image-dps-arm8x64:
build:
context: .
dockerfile: Dockerfile.arm8x64
image: defreitas/dns-proxy-server:2.19.0-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
networks:
dps:
dps_bridge:
driver: bridge