Skip to content

Commit 8391510

Browse files
author
Patrick M
committed
feat: add post
1 parent 7f5a4d5 commit 8391510

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

_posts/2024-05-27-traefik-over-tailscale.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ CF_API_EMAIL=<Replace with cloudflare api email address>
7474
CF_DNS_API_TOKEN=<Replace with cloudflare api token>
7575
WAN_HOSTNAME=<This is to add a response header with the proxy hostname for debugging>
7676
77-
TS_AUTHKEY={{ Tailscale auth token }}
77+
TS_AUTHKEY=<Tailscale auth token>
7878
```
7979

8080
Now I can add my config.yml file.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: post
3+
title: "Running SQL Server using Docker Compose"
4+
date: 2024-05-28 00:00:00 -0400
5+
category: "General"
6+
tags: ["linux", "docker", "sqlserver", "sql"]
7+
---
8+
9+
This was much easier than I thought. Using the following docker compose file, you can run SQL Server locally in docker. It is critical to use a volume for the `mssql` directory, <u>**otherwise you will lose all your data when the container restarts**</u>. The image is first party (published by Microsoft) [listed in docker hub](https://hub.docker.com/_/microsoft-mssql-server/), though the container is pulled down from Microsoft's registry directly I think.
10+
11+
```yaml
12+
# docker-compose.yaml
13+
14+
services:
15+
sql-server-db:
16+
container_name: sql-server-db
17+
image: mcr.microsoft.com/mssql/server:2022-latest
18+
ports:
19+
- "1433:1433"
20+
environment:
21+
SA_PASSWORD: ${SA_PASSWORD}
22+
ACCEPT_EULA: "Y"
23+
UID: 1000
24+
volumes:
25+
- ./mssql:/var/opt/mssql:rw
26+
```
27+
28+
You'll also need to change the _sa_ account password, or create an `.env` file.
29+
30+
```conf
31+
# .env
32+
33+
SA_PASSWORD=some_random_password
34+
```
35+
36+
Once this is up and running, you can access it normally through [SSMS](https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms) or [Azure Data Studio](https://learn.microsoft.com/en-us/azure-data-studio/download-azure-data-studio). The connection will require you to use encryption, though that should be handled automatically.

0 commit comments

Comments
 (0)