Skip to content

Commit

Permalink
feat: fully functional local docker compose setup
Browse files Browse the repository at this point in the history
  • Loading branch information
112batuhan committed Nov 22, 2024
1 parent 81f4bd7 commit c7a9009
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
version: '3'

services:
# HACKY WAY TO GET VOLUME WORKING
# DON'T DO IT IN PRODUCTION
init-data:
image: busybox
command: chmod -R 777 /data
volumes:
- surrealdb-data:/data


surrealdb:
image: surrealdb/surrealdb:latest
env_file:
Expand All @@ -14,8 +23,16 @@ services:
- $SURREAL_PASS
- --log
- debug
- rocksdb://data
ports:
- "8100:8000"
networks:
- mapper-influences-rs
volumes:
- surrealdb-data:/data
depends_on:
init-data:
condition: service_completed_successfully

mapper_influences_backend:
build:
Expand All @@ -27,12 +44,22 @@ services:
- surrealdb
ports:
- "${PORT}:${PORT}"
networks:
- mapper-influences-rs

environment:
SURREAL_URL: $SURREAL_URL
# Docker internal port
SURREAL_URL: ws://surrealdb:8000
CLIENT_ID: $CLIENT_ID
CLIENT_SECRET: $CLIENT_SECRET
REDIRECT_URI: $REDIRECT_URI
POST_LOGIN_REDIRECT_URI: $POST_LOGIN_REDIRECT_URI
JWT_SECRET_KEY: $JWT_SECRET_KEY
PORT: $PORT
ADMIN_PASSWORD: $ADMIN_PASSWORD

networks:
mapper-influences-rs:

volumes:
surrealdb-data:

0 comments on commit c7a9009

Please sign in to comment.