mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +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:
|
||||
- ./dist:/srv:ro
|
||||
|
||||
#backend:
|
||||
# image: directus/directus
|
||||
# container_name: backend
|
||||
# ports:
|
||||
# - 8055:8055
|
||||
# environment:
|
||||
# - SECRET=SECRET
|
||||
# - PUBLIC_URL=http://localhost
|
||||
# - ADMIN_EMAIL=admin@it4c.dev
|
||||
# - ADMIN_PASSWORD=admin123
|
||||
backend:
|
||||
container_name: backend
|
||||
build:
|
||||
context: ./backend
|
||||
ports:
|
||||
- 8055:8055
|
||||
environment:
|
||||
- SECRET=SECRET
|
||||
- PUBLIC_URL=http://localhost
|
||||
- ADMIN_EMAIL=admin@it4c.dev
|
||||
- ADMIN_PASSWORD=admin123
|
||||
Loading…
x
Reference in New Issue
Block a user