-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (80 loc) · 3.39 KB
/
docker-compose.yml
File metadata and controls
98 lines (80 loc) · 3.39 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
91
92
93
94
95
96
97
98
services:
service:
build:
context: .
target: development
ports:
- "8080:8080"
working_dir: &PROJECT_ROOT_DIR /app
# linux permissions / vscode support: we must explicitly run as the development user
user: development
volumes:
# mount working directory
# https://code.visualstudio.com/docs/remote/containers-advanced#_update-the-mount-consistency-to-delegated-for-macos
# https://docs.docker.com/docker-for-mac/osxfs-caching/#delegated
# the container’s view is authoritative (permit delays before updates on the container appear in the host)
- .:/app:delegated
# mount cached go pkg downloads
- go-pkg:/go/pkg
# speed up tmp dirs in working directory by using separate volumes (not the host's filesystem)
# - workdir-api-tmp:/app/api/tmp
- workdir-bin:/app/bin
- workdir-tmp:/app/tmp
# mount cached vscode container extensions
# https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
- vscode-extensions:/home/development/.vscode-server/extensions
- vscode-extensions-insiders:/home/development/.vscode-server-insiders/extensions
# https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history
# keep user development .bash_history between container restarts
- bash-history:/home/development/commandhistory
environment:
# optional: project root directory, used for relative path resolution (e.g. fixtures)
PROJECT_ROOT_DIR: *PROJECT_ROOT_DIR
# optional: env for integresql client testing
# INTEGRESQL_CLIENT_BASE_URL: "http://integresql:5000/api"
# optional: enable pretty print of log output
# intended use is for development and debugging purposes only
# not recommended to enable on production systems due to performance penalty and loss of parsing ability
SERVER_LOGGER_PRETTY_PRINT_CONSOLE: "true"
# optional: static management secret to easily call http://localhost:8080/-/healthy?mgmt-secret=mgmtpass
SERVER_MANAGEMENT_SECRET: "mgmtpass"
# path to the changie config
CHANGIE_CONFIG_PATH: "/app/.changie-go-starter.yaml"
# Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust.
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined
# Overrides default command so things don't shut down after the process ends.
command:
- /bin/sh
- -c
- |
sudo chown -R development:development /app/bin
sudo chown -R development:development /app/tmp
chmod +x /app/rksh
git config --global --add safe.directory /app
while sleep 1000; do :; done
# redis:
# image: redis:7.4
# healthcheck:
# test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
# interval: 1s
# timeout: 3s
# retries: 5
# command: ["redis-server"]
# ports:
# - 16379:6379
volumes:
# go: go mod cached downloads
go-pkg:
# tmp dirs in workdir
workdir-api-tmp:
workdir-bin:
workdir-tmp:
# vscode: Avoiding extension reinstalls on container rebuild
# https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
vscode-extensions:
vscode-extensions-insiders:
# https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history
bash-history: