Skip to content

Commit

Permalink
feat: add docker compose support and ssl certs
Browse files Browse the repository at this point in the history
- Add docker-compose.yml for containerized deployment

- Add custom SSL certificate support with configurable paths

- Create .env.example template for docker-compose configuration
  • Loading branch information
asarama committed Nov 12, 2024
1 parent 44c8dd1 commit 7a572ce
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SNOWFLAKE_ACCOUNT=XXXXX-XXXXX
SERVER_PORT=8084
HOST=0.0.0.0
SSL_KEYFILE_NAME=privkey_x.pem
SSL_CERTFILE_NAME=fullchain_x.pem
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,5 @@ celerybeat.pid
.rill/*
venv/*
.venv/*
.db/*
.db/*
.env
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,20 @@ For Docker:
docker run buremba/universql snowflake --account eq06461.eu-west-2.aws
```

### Docker Compose

Make a copy of the `.env.example` file and update the values.

**Note:** The SSL certificates are not included in the repository, and are optional. If you want to use SSL, you need to generate your own and place them in the `ssl` directory then update the `.env` file with the correct names.

```bash
cp .env.example .env
```

```bash
docker compose up
```

# CLI

```
Expand Down
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.8'

services:
universql-server:
build:
context: .
dockerfile: Dockerfile
container_name: universql-server
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
volumes:
- ./ssl:/app/ssl:ro
environment:
- UNIVERSQL_HOST=${HOST}
command: snowflake --account ${SNOWFLAKE_ACCOUNT} --host ${HOST} --ssl_keyfile /app/ssl/${SSL_KEYFILE_NAME} --ssl_certfile /app/ssl/${SSL_CERTFILE_NAME}
2 changes: 2 additions & 0 deletions ssl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore

0 comments on commit 7a572ce

Please sign in to comment.