Initial commit. Working login, example UI with prototype and demo, connections to DB and DAV, local and prod setups.
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17
|
||||
container_name: postgres
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
ports:
|
||||
- "5432:5432" # locally, do not push to prod
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
- ./init-scripts/init-script.sql:/docker-entrypoint-initdb.d/init-script.sql:ro
|
||||
networks:
|
||||
- appnet
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend
|
||||
restart: always
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
volumes:
|
||||
- ./backend/bin:/app/bin # Mount your compiled binary
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- appnet
|
||||
|
||||
sabredav:
|
||||
image: php:8.2-fpm
|
||||
container_name: sabredav
|
||||
restart: always
|
||||
working_dir: /var/www/dav
|
||||
environment:
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
volumes:
|
||||
- ./sabredav:/var/www/dav
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- appnet
|
||||
command: >
|
||||
bash -c " apt-get update && apt-get install -y git unzip libzip-dev libpq-dev && docker-php-ext-install pdo pdo_pgsql zip && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && if [ ! -f /var/www/dav/vendor/autoload.php ]; then
|
||||
cd /var/www/dav && composer install --no-dev --optimize-autoloader;
|
||||
fi && php-fpm "
|
||||
|
||||
nginx:
|
||||
image: nginx:stable
|
||||
container_name: nginx
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
- ./nginx/certs:/etc/nginx/certs
|
||||
- ./frontend/build:/usr/share/nginx/html # Serve frontend
|
||||
- ./sabredav:/var/www/dav
|
||||
depends_on:
|
||||
- backend
|
||||
- sabredav
|
||||
networks:
|
||||
- appnet
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
|
||||
|
||||
networks:
|
||||
appnet:
|
||||
Reference in New Issue
Block a user