mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
docker-compose backend + dockerfile including sync extension
Includes a directus backend in the docker-compose file and the extension `directus-sync` to allow the persisting of the directus configuration.
This commit is contained in:
parent
b39999fd65
commit
9944964e2e
12
backend/Dockerfile
Normal file
12
backend/Dockerfile
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
FROM node:20-alpine as third-party-ext
|
||||||
|
RUN apk add python3 g++ make
|
||||||
|
WORKDIR /extensions
|
||||||
|
ADD extensions .
|
||||||
|
RUN npm install
|
||||||
|
# Move all extensions the starts with directus-extension-, using find, to the /extensions/directus folder
|
||||||
|
RUN mkdir -p ./directus
|
||||||
|
RUN cd node_modules && find . -maxdepth 1 -type d -name "directus-extension-*" -exec mv {} ../directus \;
|
||||||
|
|
||||||
|
FROM directus/directus:11.4.1
|
||||||
|
# Copy third party extensions
|
||||||
|
COPY --from=third-party-ext /extensions/directus ./extensions
|
||||||
6
backend/extensions/package.json
Normal file
6
backend/extensions/package.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"name": "directus-extensions",
|
||||||
|
"dependencies": {
|
||||||
|
"directus-extension-sync": "^3.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,13 +7,14 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./dist:/srv:ro
|
- ./dist:/srv:ro
|
||||||
|
|
||||||
#backend:
|
backend:
|
||||||
# image: directus/directus
|
container_name: backend
|
||||||
# container_name: backend
|
build:
|
||||||
# ports:
|
context: ./backend
|
||||||
# - 8055:8055
|
ports:
|
||||||
# environment:
|
- 8055:8055
|
||||||
# - SECRET=SECRET
|
environment:
|
||||||
# - PUBLIC_URL=http://localhost
|
- SECRET=SECRET
|
||||||
# - ADMIN_EMAIL=admin@it4c.dev
|
- PUBLIC_URL=http://localhost
|
||||||
# - ADMIN_PASSWORD=admin123
|
- ADMIN_EMAIL=admin@it4c.dev
|
||||||
|
- ADMIN_PASSWORD=admin123
|
||||||
Loading…
x
Reference in New Issue
Block a user