Simplify first user creation
This commit is contained in:
parent
391ab5ddac
commit
1e3e03e4af
@ -12,7 +12,8 @@ RUN mkdir /opt/recipes
|
||||
RUN chown recipes:recipes /opt/recipes
|
||||
WORKDIR /opt/recipes
|
||||
COPY --chown=recipes:recipes . ./
|
||||
RUN chmod +x boot.sh
|
||||
RUN chmod +x boot.sh setup.sh
|
||||
RUN ln -s /opt/recipes/setup.sh /usr/local/bin/createsuperuser
|
||||
|
||||
# hadolint ignore=DL3018
|
||||
RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-dev jpeg-dev && \
|
||||
|
@ -51,7 +51,7 @@ When clicking submit, every recipe containing the word will be updated (tags are
|
||||
2. Choose one of the included configurations [here](https://github.com/vabene1111/recipes/tree/develop/docs/docker).
|
||||
3. Copy (if needed) the `docker-compose.override.yml.template` to `docker-compose.override.yml` and uncomment the configurations you need.
|
||||
4. Start the container (`docker-compose up -d`)
|
||||
5. Create a default user by executing into the container with `docker-compose exec web_recipes sh` and run `python3 manage.py createsuperuser`.
|
||||
5. Create a default user by running `docker-compose exec -it <web_recipes> createsuperuser`. **Replace "<web_recipes>" with your instance name which can be found via running `docker ps`**
|
||||
|
||||
### Manual
|
||||
Copy `.env.template` to `.env` and fill in the missing values accordingly.
|
||||
|
4
boot.sh
4
boot.sh
@ -2,8 +2,8 @@
|
||||
source venv/bin/activate
|
||||
|
||||
echo "Updating database"
|
||||
python3 manage.py migrate
|
||||
python3 manage.py collectstatic --noinput
|
||||
python manage.py migrate
|
||||
python manage.py collectstatic --noinput
|
||||
echo "Done"
|
||||
|
||||
exec gunicorn -b :8080 --access-logfile - --error-logfile - recipes.wsgi
|
Loading…
Reference in New Issue
Block a user