File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
docs/docs/docs/getting-started Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,18 @@ RUN groupmod -n talawa vscode \
32
32
&& touch /commandhistory/.bash_history \
33
33
&& chown -R talawa /commandhistory \
34
34
&& echo "export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" >> /home/talawa/.bashrc
35
+ # Create a global profile script that both login and non-interactive shells load
36
+ RUN echo '#!/bin/sh' > /etc/profile.d/fnm.sh \
37
+ && echo 'export PATH="/home/talawa/.local/share/fnm:$PATH"' >> /etc/profile.d/fnm.sh \
38
+ && echo 'eval "$(fnm env --corepack-enabled --resolve-engines --use-on-cd --version-file-strategy=recursive)"' >> /etc/profile.d/fnm.sh \
39
+ && chmod +x /etc/profile.d/fnm.sh
40
+ # Ensure non-interactive bash sessions load the script
41
+ ENV BASH_ENV=/etc/profile.d/fnm.sh
42
+ # Also, have the talawa login shell source it explicitly by appending to its .bashrc
43
+ RUN echo "source /etc/profile.d/fnm.sh" >> /home/talawa/.bashrc
35
44
USER talawa
36
45
# Installs fnm.
37
- RUN curl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell \
38
- # Appends the fnm configuration to `/home/talawa/.bashrc` file.
39
- && echo eval \"\$\( fnm env --corepack-enabled --resolve-engines --use-on-cd --version-file-strategy=recursive\)\" >> /home/talawa/.bashrc
46
+ RUN curl -fsSL --proto '=https' --tlsv1.2 https://fnm.vercel.app/install | bash -s -- --skip-shell
40
47
ENV PATH=/home/talawa/.local/share/fnm:${PATH}
41
48
WORKDIR /home/talawa/api
42
49
Original file line number Diff line number Diff line change @@ -409,13 +409,9 @@ We have created sample data to make it easier for end users to get an understand
409
409
This applies to users running Talawa API in dev containers.
410
410
411
411
1 . Once the server is running, open a new terminal session.
412
- 2 . Open a bash session inside the running container :
412
+ 2 . Run the following command to import sample data into the database :
413
413
``` bash
414
- docker exec -it talawa-api-1 /bin/bash
415
- ```
416
- 3 . Inside the container, run the following command to import sample data into the database:
417
- ``` bash
418
- pnpm run import:sample-data
414
+ docker exec talawa-api-1 /bin/bash -c ' pnpm run add:sample_data && exit'
419
415
```
420
416
4 . Then exit
421
417
``` bash
You can’t perform that action at this time.
0 commit comments