Skip to content
Merged
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
11 changes: 6 additions & 5 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ RTE_TOKEN=AnsibleForms!RTE!Token!123
# Default: git push
# GIT_PUSH_COMMAND=git push

# Home directory inside the container. Used by docker-compose.yml to mount data/ssh and
# data/git/.gitconfig there. Only change it together with HOME_PATH.
HOME_DIR=/root
# Home directory inside the containers, which run as the user node (uid 1000). Used by
# docker-compose.yml to mount data/ssh and data/git/.gitconfig there. Only change it together
# with HOME_PATH.
HOME_DIR=/home/node

# Home directory the app uses for its SSH key and git connections
# Default: OS home directory (/root in the image)
# HOME_PATH=/root
# Default: OS home directory (/home/node in the image)
# HOME_PATH=/home/node

# =============================================================================
# YTT (YAML TEMPLATING TOOL) CONFIGURATION
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ jobs:
- name: The compose file is valid
run: docker compose config --quiet

# the containers run as uid 1000, the checkout belongs to the runner's user (README.md)
- name: Give the containers the data folder
run: sudo chown -R 1000:1000 data

- name: Start the stack
run: docker compose up -d

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ The app then listens on https://localhost with a self-signed certificate; log in
```bash
git clone https://github.com/ansibleforms/docker.git ansibleforms
cd ansibleforms
sudo chown -R 1000:1000 data
docker compose up -d
```

The app and the RTE run as the user `node` (uid 1000), so they need to own `data/`: that is what the `chown` is for.
Coming from 6, whose container ran as root, run the same `chown` once before you start 7; MySQL takes its own folder back when it starts.

## What you get

Everything under `data/` is mounted into the containers and survives a restart or an upgrade.
Expand Down
Loading