# Deployment

The easiest way to deploy **Gauguin** is by using **Docker**.\
More specifically, we'll need three different services, so we're going to use **docker-compose**.

Let's log into your server and create a file called `docker-compose.yaml`

```yaml
version: '3.7'

services:

  alpine_chrome:
    image: zenika/alpine-chrome:latest
    container_name: gauguin-chrome-apline
    command: [chromium-browser, "--headless", "--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage", "--remote-debugging-address=0.0.0.0", "--remote-debugging-port=9222"]
    ports:
      - 9222:9222
    restart: unless-stopped
    networks:
      - caddynet

  gin_gonic:
    image: docker.pkg.github.com/micheleriva/gauguin/server:v0.0.1
    links:
      - alpine_chrome
      - caddy
    depends_on:
      - alpine_chrome
    env_file:
      - .env
    ports:
      - 5491:5491
    expose:
      - '5491'
    volumes:
      - ./:/app
    restart: unless-stopped
    networks:
      - caddynet

  caddy:
    image: abiosoft/caddy
    container_name: gauguin-caddy
    cap_add:
      - CAP_NET_BIND_SERVICE
    ports:
      - 80:80
      - 443:443
    expose:
      - '443'
      - '80'
    volumes:
      - ./Caddyfile:/etc/Caddyfile
    command: -conf /etc/Caddyfile
    restart: always
    networks:
      - caddynet

networks:
  caddynet:
    driver: bridge
```

As you can see, we're using **Caddy** as a reverse proxy. Let's create a new file called `Caddyfile`:

```
example.com:80, example.com:443 {
  gzip
  tls example@example.com
  tls self_signed

  proxy / gauguin-gin-gonic:5491 {
    transparent
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://micheleriva.gitbook.io/gauguin/deployment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
