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

Dockerised piccolo_admin #427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dl-lim
Copy link

@dl-lim dl-lim commented Oct 18, 2024

Basic copy of admin_ui in docker.

To add a standalone application in docker next, with .env to configure db connections.

@dl-lim dl-lim mentioned this pull request Oct 18, 2024
Comment on lines +4 to +17
# Set the working directory to /admin_ui
WORKDIR /admin_ui

# Copy the current directory contents into the container at /admin_ui
COPY admin_ui .

# Install any needed packages specified in package.json
RUN npm install --no-audit --no-fund

# Expose port 3000
EXPOSE 3000

# Run npm run dev when the container launches
CMD ["npm", "run", "dev"]
Copy link
Member

Choose a reason for hiding this comment

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

This solution is OK for development, but for production we don't need to install the npm dependencies etc. When we release piccolo_admin on PyPI, we bundle all of the front end assets.

So we just need a Python file which runs create_admin, but reads the database values from environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants