Skip to content
Snippets Groups Projects
Select Git revision
  • c22940a3689cb0492f38e8c45b5e48f77766c95e
  • master default protected
  • v2 protected
  • v2-test protected
  • piratiuk
  • regionalSuccess
  • v1
7 results

Dockerfile

Blame
  • user avatar
    Tomáš Valenta authored
    d9fe3227
    History
    Dockerfile 947 B
    FROM python:3.11
    
    RUN mkdir /app
    
    RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash -
    RUN apt-get -y install make autoconf automake libtool pkg-config nodejs git python3-pip
    RUN rm -rf /var/lib/apt/lists/*
    
    WORKDIR /app
    
    COPY . .
    
    # Install Python reqs
    RUN cd server; pip install -r requirements/base.txt
    
    # Install Node.js reqs
    RUN cd frontend; npm install
    
    # Build and copy files
    RUN cd frontend; \
        npm run build; \
        rm -fr ../server/server/templates ../server/server/static; \
        mkdir ../server/server/templates ../server/server/static; \
        cp dist/index.html ../server/server/templates/; \
        cp dist/static/* ../server/server/static/; \
        cp dist/favicon.ico ../server/server/static/; \
        rm -fr dist
    
    RUN bash -c "adduser --disabled-login --quiet --gecos app app &&  \
                 chmod -R o+r /app/ && \
                 chmod o+x /app/server/run.sh"
    USER app
    
    WORKDIR /app/server
    
    EXPOSE 8000
    CMD ["bash", "run.sh"]