Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include RUNNING_ENV in psql and shell prompt #32

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PS1="($RUNNING_ENV) $PS1"

cat /etc/root-banner
1 change: 1 addition & 0 deletions .psqlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
\set PROMPT1 %/(`echo $RUNNING_ENV`) =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not finished. We need to start from the default PROMPT1 and adapt it.

8 changes: 7 additions & 1 deletion Dockerfile-11.0
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-12.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-13.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-14.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-15.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-16.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-17.0
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ VOLUME ["/data/odoo"]

EXPOSE 8069 8072

# psqlrc
COPY .psqlrc /root/.psqlrc

# root banner
COPY ./root-banner /etc
RUN echo "cat /etc/root-banner" >> /root/.bashrc

# bashrc
COPY .bashrc /tmp
RUN cat /tmp/.bashrc >> /root/.bashrc

COPY ./start-entrypoint.d /odoo/start-entrypoint.d
COPY ./bin/entrypoint.sh /usr/local/bin/entrypoint.sh
Expand Down