mirror of
https://github.com/khairul169/excalidraw-docker.git
synced 2025-04-28 08:39:37 +07:00
chore: add compose file
This commit is contained in:
commit
ac569cc925
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@ -0,0 +1,39 @@
|
||||
services:
|
||||
app:
|
||||
image: alswl/excalidraw:v0.17.3-fork-b1
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- VITE_APP_BACKEND_V2_GET_URL=/storage/api/v2/scenes/
|
||||
- VITE_APP_BACKEND_V2_POST_URL=/storage/api/v2/scenes/
|
||||
- VITE_APP_WS_SERVER_URL=/
|
||||
- VITE_APP_FIREBASE_CONFIG={}
|
||||
- VITE_APP_HTTP_STORAGE_BACKEND_URL=/storage/api/v2
|
||||
- VITE_APP_STORAGE_BACKEND=http
|
||||
- VITE_APP_DISABLE_TRACKING=true
|
||||
- PUBLIC_URL=
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
storage:
|
||||
image: alswl/excalidraw-storage-backend:v2023.11.11
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- STORAGE_URI=postgres://postgres:postgres@host.docker.internal:5432/excalidraw
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
expose:
|
||||
- "8080"
|
||||
|
||||
room:
|
||||
image: excalidraw/excalidraw-room:sha-49bf529
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9012:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
57
nginx.conf
Normal file
57
nginx.conf
Normal file
@ -0,0 +1,57 @@
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
upstream app {
|
||||
server app:80;
|
||||
}
|
||||
|
||||
upstream storage {
|
||||
server storage:8080;
|
||||
}
|
||||
|
||||
upstream room {
|
||||
server room:80;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
location / {
|
||||
proxy_pass http://app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /storage/ {
|
||||
rewrite ^/storage/(.*)$ /$1 break;
|
||||
proxy_pass http://storage/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /socket.io/ {
|
||||
proxy_pass http://room;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user