Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example to start Atomic Server with Cloudflared tunnel and 1password cli #752

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/src/atomicserver/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TUNNEL_URL=http://atomic-server:80
TUNNEL_TOKEN=op://Shared/testing_demo/token
ATOMIC_SERVER_URL=op://Shared/testing_demo/server_url
ATOMIC_DOMAIN=op://Shared/testing_demo/domain
28 changes: 28 additions & 0 deletions docs/src/atomicserver/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3.4"

services:
atomic-server:
image: joepmeneer/atomic-server
container_name: atomic-server
restart: unless-stopped
environment:
ATOMIC_DOMAIN: ${ATOMIC_DOMAIN}
ATOMIC_SERVER_URL: ${ATOMIC_SERVER_URL}
ports:
- 8080:80
volumes:
- data:/atomic-storage
cloudflared:
image: cloudflare/cloudflared:latest
environment:
TUNNEL_URL: ${TUNNEL_URL}
TUNNEL_TOKEN: ${TUNNEL_TOKEN}
command: "tunnel run"
volumes:
- ./cloudflared:/etc/cloudflared
links:
- atomic-server
depends_on:
- atomic-server
volumes:
data:
46 changes: 46 additions & 0 deletions docs/src/atomicserver/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,52 @@ systemctl restart atomic
journalctl -u atomic.service --since "1 hour ago" -f
```

# Install Atomic Data Server with docker-compose and cloudflare tunnel

To install atomic server with docker-compose and cloudflared tunnel, create docker-compose.yml

```yaml
version: "3.4"

services:
atomic-server:
image: joepmeneer/atomic-server
container_name: atomic-server
restart: unless-stopped
environment:
ATOMIC_DOMAIN: ${ATOMIC_DOMAIN}
ATOMIC_SERVER_URL: ${ATOMIC_SERVER_URL}
ports:
- 8080:80
volumes:
- data:/atomic-storage
cloudflared:
image: cloudflare/cloudflared:latest
environment:
TUNNEL_URL: ${TUNNEL_URL}
TUNNEL_TOKEN: ${TUNNEL_TOKEN}
command: "tunnel run"
volumes:
- ./cloudflared:/etc/cloudflared
links:
- atomic-server
depends_on:
- atomic-server
volumes:
data:
```

and .env file with:

```
TUNNEL_URL=http://atomic-server:8080
TUNNEL_TOKEN=op://at.terraphim.dev/token
ATOMIC_SERVER_URL=op://Shared/at.terraphim.dev/server_url
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a little confused by this type of URL. Perhaps the OnePassword thing should be left out?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can move configs into sample folder - I don't mind including .env since it's one password URL to fetch data. I think it's easier to have fully functioning docker compose + env, but it depends on secrets, hence 1password thing.

ATOMIC_DOMAIN=op://Shared/at.terraphim.dev/domain
```

to use with one password cli `op run --no-masking --env-file .env -- docker-compose up`

## AtomicServer CLI options / ENV vars

(run `atomic-server --help` to see the latest options)
Expand Down