-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·90 lines (87 loc) · 2.54 KB
/
docker-compose.yml
File metadata and controls
executable file
·90 lines (87 loc) · 2.54 KB
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
#version: "3.9"
services:
develop:
container_name: ${INSTANCE_NAME}-develop
image: ${INSTANCE_NAME}-develop
build:
context: ./$INSTANCE_NAME
dockerfile: Dockerfile
target: develop
args:
TZ: $TZ
network: host
privileged: true
network_mode: service:ovpn
volumes:
- /dev:/dev
- ./$INSTANCE_NAME/projects:/root/projects
- ./$INSTANCE_NAME/input:/shared/input
- ./$INSTANCE_NAME/output:/shared/output
- ./$INSTANCE_NAME/scripts:/shared/scripts
- ./$INSTANCE_NAME/dotfiles:/shared/dotfiles
- ./$INSTANCE_NAME/apt-config:/shared/apt-config
- ./$INSTANCE_NAME/config:/shared/config
- ./ssh-keys:/shared/ssh-keys
tmpfs:
- /tmp
- /run
- /run/lock
# Include 'tini'
init: true
# Keep alive: Wait for attach, restart on exit
restart: unless-stopped
stdin_open: true
tty: true
test:
container_name: ${INSTANCE_NAME}-test
image: ${INSTANCE_NAME}-test
build:
context: ./$INSTANCE_NAME
dockerfile: Dockerfile
target: test
args:
SB_SOURCE_DIR: /root/example-repo/
TZ: $TZ
network: host
environment:
- CUSTOM_CMD=$TEST_CUSTOM_CMD
privileged: true
network_mode: service:ovpn
volumes:
- /dev:/dev
- ./$INSTANCE_NAME/input:/shared/input
- ./$INSTANCE_NAME/output:/shared/output
- ./$INSTANCE_NAME/scripts:/shared/scripts
- ./$INSTANCE_NAME/config:/shared/config
- ./$INSTANCE_NAME/packages:/shared/packages
tmpfs:
- /tmp
- /run
- /run/lock
stdin_open: false
tty: false
ovpn:
container_name: ovpn
hostname: ovpn
image: ovpn
build:
context: ./ovpn
dockerfile: Dockerfile
network: host
volumes:
- ./ovpn/scripts:/shared/scripts
- ./ssh-keys:/shared/ssh-keys
devices:
- "/dev/net/tun"
ports:
# TODO: define port numbers in .env
- "2223:23"
- "2222:22" #develop ssh
cap_add:
- NET_ADMIN
# Include 'tini'
init: true
# Keep alive
restart: always
stdin_open: true
tty: true