Odoo18-Base/Dockerfile
KaySar12 82fad9712a
Some checks are pending
Setup Native Action / native (3.12.7) (push) Waiting to run
Setup Native Action / docker (3.12.7) (push) Waiting to run
add backup_db script and add docker-compose no database
2025-03-20 18:00:49 +07:00

34 lines
1.2 KiB
Docker

FROM odoo:18.0
# Overwrite odoo with addons
COPY ./odoo /usr/lib/python3/dist-packages/
COPY ./addons /usr/lib/python3/dist-packages/odoo
COPY ./deployment/entrypoint.sh /
# Copy entrypoint script and Odoo configuration file
# COPY deployment/entrypoint.sh /
# COPY deployment/odoo.conf /etc/odoo/
USER root
RUN apt-get update && apt-get install -y libreoffice
USER odoo
COPY ./deployment/requirements.txt /usr/lib/python3/dist-packages/odoo
RUN pip install -r /usr/lib/python3/dist-packages/odoo/requirements.txt --break-system-packages
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons and /mnt/backup for backup
RUN chown odoo /etc/odoo/odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons \
&& mkdir -p /var/lib/odoo/backup \
&& chown -R odoo /var/lib/odoo/backup
VOLUME ["/var/lib/odoo", "/mnt/extra-addons","/var/lib/odoo/backup"]
# Expose Odoo services
EXPOSE 8069 8071 8072
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
# COPY deployment/wait-for-psql.py /usr/local/bin/wait-for-psql.py
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]