Wiki source code of Deployment
Last modified by chrisby on 2024/03/03 14:54
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | (% style="text-align: justify;" %) | ||
| 2 | ====== docker-compose.yml ====== | ||
| 3 | |||
| 4 | {{code language="none"}} | ||
| 5 | version: "3.3" | ||
| 6 | |||
| 7 | volumes: | ||
| 8 | traefik: | ||
| 9 | xwiki: | ||
| 10 | postgres: | ||
| 11 | |||
| 12 | services: | ||
| 13 | traefik: | ||
| 14 | image: "traefik:v2.10.4" | ||
| 15 | container_name: "traefik" | ||
| 16 | restart: unless-stopped | ||
| 17 | command: | ||
| 18 | - "--api.insecure=true" | ||
| 19 | - "--providers.docker=true" | ||
| 20 | - "--providers.docker.exposedbydefault=false" | ||
| 21 | - "--entrypoints.websecure.address=:443" | ||
| 22 | - "--certificatesresolvers.myresolver.acme.tlschallenge=true" | ||
| 23 | # - "--certificatesresolvers.myresolver.acme.email=<email>" | ||
| 24 | - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json" | ||
| 25 | # Uncomment for test mode. This allows detailed logging and creation of a fake certificate. | ||
| 26 | # - "--log.level=DEBUG" | ||
| 27 | # - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" | ||
| 28 | ports: | ||
| 29 | - "443:443" | ||
| 30 | volumes: | ||
| 31 | - "traefik:/letsencrypt" | ||
| 32 | - "/var/run/docker.sock:/var/run/docker.sock:ro" | ||
| 33 | |||
| 34 | xwiki: | ||
| 35 | image: "xwiki:15.7.0-postgres-tomcat" | ||
| 36 | container_name: xwiki-web | ||
| 37 | restart: unless-stopped | ||
| 38 | depends_on: | ||
| 39 | - db | ||
| 40 | environment: | ||
| 41 | - DB_USER=xwiki | ||
| 42 | - DB_PASSWORD=<DB_USER_PASSWORD> | ||
| 43 | - DB_HOST=xwiki-postgres-db | ||
| 44 | volumes: | ||
| 45 | - xwiki:/usr/local/xwiki | ||
| 46 | labels: | ||
| 47 | - "traefik.enable=true" | ||
| 48 | - "traefik.http.routers.xwiki.rule=Host(`<subdomain>`)" | ||
| 49 | - "traefik.http.routers.xwiki.entrypoints=websecure" | ||
| 50 | - "traefik.http.routers.xwiki.tls.certresolver=myresolver" | ||
| 51 | |||
| 52 | db: | ||
| 53 | image: "postgres:13.9" | ||
| 54 | container_name: xwiki-postgres-db | ||
| 55 | restart: unless-stopped | ||
| 56 | volumes: | ||
| 57 | - postgres:/var/lib/postgresql/data | ||
| 58 | environment: | ||
| 59 | - POSTGRES_ROOT_PASSWORD=<DB_ROOT_PASSWORD> | ||
| 60 | - POSTGRES_PASSWORD=<DB_USER_PASSWORD> | ||
| 61 | - POSTGRES_USER=xwiki | ||
| 62 | - POSTGRES_DB=xwiki | ||
| 63 | - POSTGRES_INITDB_ARGS="--encoding=UTF8" | ||
| 64 | {{/code}} | ||
| 65 | |||
| 66 | ====== Instructions ====== | ||
| 67 | |||
| 68 | * Execute {{code language="none"}}docker-compose up -d{{/code}} | ||
| 69 | * Go to {{code language="none"}}https://subdomain>{{/code}}. XWiki may take a few minutes to set up. | ||
| 70 | * Once initialization is complete, simply follow the instructions, including creating an admin account. | ||
| 71 | * After deploying XWiki, you should configure it through the GUI to customize the website to your needs. I have written an article about the [[most important configurations>>doc:Software Stacks.XWiki.Most Important Configurations.WebHome]] that I had applied for this website. |