The procedure below has been tested on a Digital Ocean VM with CentOS 7.4
# Install docker from RHEL’s standard repos
yum install -y docker
#
# We’ll activate the ‘user namespaces’ feature that defends against
| #!/usr/bin/env python3 | |
| # | |
| # Dumb script to dump (some) of bcache status | |
| # Copyright 2013 Darrick J. Wong. All rights reserved. | |
| # | |
| # This file is part of Bcache. Bcache is free software: you can | |
| # redistribute it and/or modify it under the terms of the GNU General Public | |
| # License as published by the Free Software Foundation, version 2. | |
| # | |
| # This program is distributed in the hope that it will be useful, but WITHOUT |
| #!/usr/bin/env python3 | |
| import asyncio | |
| import iterm2 | |
| THEME_LIGHT = "Tango Light" | |
| THEME_DARK = "Tango Dark" | |
| class AutoSwitchTheme: |
| import Foundation | |
| import Combine | |
| public struct Event: Identifiable { | |
| public let id: FSEventStreamEventId | |
| public let path: String | |
| public let flags: Flags | |
| } | |
| public class FileSystemEventStream { |
| apt-get update && apt-get install -y make cmake gcc g++ patch | |
| curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz | tar zx -C /opt/ | |
| cd /opt/protobuf-2.5.0 | |
| curl -L -O https://gist.githubusercontent.com/liusheng/64aee1b27de037f8b9ccf1873b82c413/raw/118c2fce733a9a62a03281753572a45b6efb8639/protobuf-2.5.0-arm64.patch | |
| patch -p1 < protobuf-2.5.0-arm64.patch | |
| ./configure --disable-shared | |
| make | |
| ls -l src/protoc |
| nm __BINARY__ | awk '{ print $3 }' | xargs xcrun swift-demangle {} \; | less |
| # Thanks to here https://stackoverflow.com/questions/13861658/is-it-possible-to-search-though-all-xcodes-logs | |
| EXT=".xcactivitylog" | |
| for LOG in *.xcactivitylog; do | |
| NAME=`basename $LOG $EXT` | |
| gunzip -c -S $EXT "${NAME}${EXT}" > "${NAME}.log" | |
| done |
| // Generate a minor version code from git commit count (for prod builds) | |
| static def generateVersionCode() { | |
| def result = "git rev-list HEAD --count".execute().text.trim() //unix | |
| if(result.empty) result = "PowerShell -Command git rev-list HEAD --count".execute().text.trim() //windows | |
| if(result.empty) throw new RuntimeException("Could not generate versioncode on this platform? Cmd output: ${result.text}") | |
| return result.toInteger() | |
| } | |
| def majorVersion = 1 |
| File | Purpose |
|---|---|
/etc/compose/docker-compose.yml |
Compose file describing what to deploy |
/etc/systemd/system/docker-compose-reload.service |
Executing unit to trigger reload on docker-compose.service |
/etc/systemd/system/docker-compose-reload.timer |
Timer unit to plan the reloads |
/etc/systemd/system/docker-compose.service |
Service unit to start and manage docker compose |
Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service