Files
a13labs.infra/ansible/roles/linux_dev_station/templates/opencode.service.j2
T
alexandre.pires 272ed647cf Refactor and enhance Ansible configurations for dev-02 and nginx proxy setup
- Updated host_vars for dev-02 to include login history settings and modified code server authentication.
- Adjusted opencode server configurations and reduced resource allocation.
- Introduced a new playbook for configuring nginx reverse proxy with TLS and OAuth2.
- Enhanced linux_dev_station role defaults and tasks, including package updates and service configurations.
- Removed unnecessary credential assertions in linux_dev_station tasks.
- Created nginx_proxy role with tasks for certbot, nginx installation, and oauth2-proxy setup.
- Added templates for nginx and oauth2-proxy configurations.
- Updated terraform configuration to reflect new DNS records for ide and agent services.
- Documented changes and configurations in linux_dev_station.md for clarity and future reference.
2026-07-11 19:29:50 -04:00

28 lines
968 B
Django/Jinja

[Unit]
Description=OpenCode - AI-powered terminal IDE
After=network.target
[Service]
Type=simple
User={{ linux_dev_station_service_user }}
Group={{ linux_dev_station_service_user }}
WorkingDirectory={{ linux_dev_station_workspace_dir }}
ExecStart=/bin/zsh -i {{ linux_dev_station_scripts_dir }}/start-opencode.sh
Restart=always
RestartSec=5
StandardOutput=append:{{ linux_dev_station_logs_dir }}/opencode.log
StandardError=append:{{ linux_dev_station_logs_dir }}/opencode.err.log
Environment="HOME={{ linux_dev_station_service_home }}"
Environment="PATH={{ linux_dev_station_path }}"
Environment="TMPDIR={{ linux_dev_station_service_home }}/.cache/tmp"
{% for env_key, env_value in linux_dev_station_opencode_extra_environment.items() %}
Environment="{{ env_key }}={{ env_value }}"
{% endfor %}
{% if linux_dev_station_ssh_agent_enabled | bool %}
Environment="SSH_AUTH_SOCK={{ linux_dev_station_ssh_agent_socket }}"
{% endif %}
[Install]
WantedBy=multi-user.target