Infrastructure-as-Code project for deploying Counter-Strike 1.6 dedicated servers on DigitalOcean or locally using Docker and Ansible.
- Docker
- Docker Compose
- Ansible
- doctl - DigitalOcean CLI
- Ahoy CLI - Task runner
- DigitalOcean account with API token configured
- SSH key pair in
~/.ssh/
-
Configure environment variables:
ahoy do envThis interactively sets up droplet size, region, Ubuntu image, and SSH key.
-
Create and deploy the droplet:
ahoy do up -
Provision the server with Docker and CS 1.6:
ahoy ansible setup
-
Connect to your server:
ahoy do ssh -
View server logs:
ahoy do logs
Run the CS 1.6 server locally for testing:
ahoy docker build
ahoy docker up| Command | Description |
|---|---|
ahoy do env |
Setup all environment variables (size, region, image, SSH key) |
ahoy do up |
Create and deploy DigitalOcean droplet |
ahoy do ssh |
SSH into the server |
ahoy do logs |
View Docker Compose logs on remote server |
ahoy do destroy |
Delete the droplet and associated resources |
| Command | Description |
|---|---|
ahoy ansible setup |
Install Docker and deploy CS 1.6 server |
ahoy ansible create-hosts-file |
Generate Ansible inventory from .env |
| Command | Description |
|---|---|
ahoy docker build |
Build the CS 1.6 Docker image |
ahoy docker up |
Start containers locally |
ahoy docker down |
Stop containers |
ahoy docker logs |
View container logs |
To destroy all DigitalOcean resources:
ahoy do destroyTo clean up local Docker resources:
ahoy docker cleanup