mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
refactor(docker): directus use postgress, redis and fix cors (#26)
* directus use postgress, redis and fix cors In order to use gis features you can install some plugins to sqlite or use postgres which supports those features natively. Use a redis cache as this was part of the advanced setup example. Furthermore fix cors and allow http://localhost:8080 by default. * lint fixes
This commit is contained in:
parent
02833c79af
commit
1d00438440
@ -1,5 +1,5 @@
|
||||
services:
|
||||
server:
|
||||
frontend:
|
||||
image: cupcakearmy/static
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@ -7,14 +7,64 @@ services:
|
||||
volumes:
|
||||
- ./dist:/srv:ro
|
||||
|
||||
database:
|
||||
image: postgis/postgis:13-master
|
||||
# Required when running on platform other than amd64, like Apple M1/M2:
|
||||
# platform: linux/amd64
|
||||
volumes:
|
||||
- ./data/database:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: 'directus'
|
||||
POSTGRES_PASSWORD: 'directus'
|
||||
POSTGRES_DB: 'directus'
|
||||
healthcheck:
|
||||
test: ['CMD', 'pg_isready', '--host=localhost', '--username=directus']
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_interval: 5s
|
||||
start_period: 30s
|
||||
|
||||
cache:
|
||||
image: redis:6
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', "[ $$(redis-cli ping) = 'PONG' ]"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_interval: 5s
|
||||
start_period: 30s
|
||||
|
||||
backend:
|
||||
container_name: backend
|
||||
build:
|
||||
context: ./backend
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
cache:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- 8055:8055
|
||||
environment:
|
||||
- SECRET=SECRET
|
||||
- PUBLIC_URL=http://localhost
|
||||
- ADMIN_EMAIL=admin@it4c.dev
|
||||
- ADMIN_PASSWORD=admin123
|
||||
PUBLIC_URL: 'http://localhost'
|
||||
|
||||
SECRET: 'SECRET'
|
||||
|
||||
CORS_ENABLED: 'true'
|
||||
CORS_ORIGIN: 'http://localhost:8080'
|
||||
|
||||
DB_CLIENT: 'pg'
|
||||
DB_HOST: 'database'
|
||||
DB_PORT: '5432'
|
||||
DB_DATABASE: 'directus'
|
||||
DB_USER: 'directus'
|
||||
DB_PASSWORD: 'directus'
|
||||
|
||||
CACHE_ENABLED: 'true'
|
||||
CACHE_AUTO_PURGE: 'true'
|
||||
CACHE_STORE: 'redis'
|
||||
REDIS: 'redis://cache:6379'
|
||||
|
||||
ADMIN_EMAIL: 'admin@it4c.dev'
|
||||
ADMIN_PASSWORD: 'admin123'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user