-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
74e4370
commit aff237e
Showing
6 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
echo "Stop octopus-local." | ||
systemctl is-active --quiet octopus-local && systemctl stop octopus-local | ||
|
||
docker-compose down | ||
|
||
if [ ! -d "mssql" ]; then | ||
echo "Create mssql folder." | ||
mkdir mssql | ||
echo "Set owner of mssql/." | ||
chown -R mssql:0 mssql/ | ||
echo "mssql/ configured." | ||
fi | ||
|
||
if [ ! -d "sqlserver" ]; then | ||
echo "Create sqlserver folder." | ||
mkdir sqlserver | ||
echo "Set owner of sqlserver/." | ||
chown -R mssql:0 sqlserver/ | ||
echo "sqlserver/ configured." | ||
fi | ||
|
||
docker-compose up -d | ||
mv octopus-local.service /etc/systemd/system | ||
mv octopus.local /etc/nginx/sites-available | ||
|
||
echo "Start octopus-local." | ||
systemctl is-enabled --quiet octopus-local || systemctl enable octopus-local | ||
systemctl start octopus-local | ||
echo "Reload systemctl daemon." | ||
systemctl daemon-reload | ||
echo "Restart nginx." | ||
systemctl restart nginx | ||
|
||
write_highlight "[octopus.local](https://octopus.local)" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: "3" | ||
services: | ||
db: | ||
image: mcr.microsoft.com/mssql/server | ||
environment: | ||
SA_PASSWORD: "" | ||
ACCEPT_EULA: "N" | ||
# Prevent SQL Server from consuming the defult of 80% physical memory. | ||
MSSQL_MEMORY_LIMIT_MB: 2048 | ||
ports: | ||
- 1401:1433 | ||
healthcheck: | ||
test: | ||
[ | ||
"CMD", | ||
"/opt/mssql-tools/bin/sqlcmd", | ||
"-U", | ||
"sa", | ||
"-P", | ||
"thisisn'ttherightpassword", | ||
"-Q", | ||
"select 1", | ||
] | ||
interval: 10s | ||
retries: 10 | ||
volumes: | ||
- ./mssql:/var/opt/mssql/data | ||
octopus-server: | ||
image: octopusdeploy/octopusdeploy:latest | ||
privileged: true | ||
environment: | ||
ACCEPT_EULA: "N" | ||
OCTOPUS_SERVER_NODE_NAME: "" | ||
DB_CONNECTION_STRING: "" | ||
ADMIN_USERNAME: "" | ||
ADMIN_PASSWORD: "" | ||
ADMIN_EMAIL: "" | ||
OCTOPUS_SERVER_BASE64_LICENSE: "" | ||
MASTER_KEY: "" | ||
ports: | ||
- 8080:8080 | ||
- 10943:10943 | ||
depends_on: | ||
- db | ||
volumes: | ||
- ./taskLogs:/taskLogs | ||
- ./artifacts:/artifacts | ||
- ./repository:/repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=#{Project.Octopus.ServiceDescription} | ||
Requires=docker.service | ||
After=docker.service | ||
|
||
[Service] | ||
WorkingDirectory=#{Project.Octopus.InstallLocation} | ||
ExecStart=/usr/bin/docker-compose up | ||
ExecStop=/usr/bin/docker-compose stop | ||
TimeoutStartSec=0 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
server { | ||
listen 443 ssl; | ||
|
||
ssl_certificate /etc/ssl/octopus.crt; | ||
ssl_certificate_key /etc/ssl/octopus.key; | ||
ssl_session_cache shared:SSL:20m; | ||
ssl_session_timeout 180m; | ||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | ||
add_header Strict-Transport-Security "max-age=31536000" always; | ||
|
||
server_name octopus.local; | ||
|
||
location / { | ||
proxy_set_header Host $host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
|
||
proxy_pass http://127.0.0.1:#{Project.Octopus.Port}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if id "mssql" >/dev/null 2>&1; then | ||
echo "User mssql exists." | ||
else | ||
echo "Create user mssql." | ||
useradd -M -s /bin/bash -u 10001 -g 0 mssql | ||
fi |