services: backend: build: context: packages/backend dockerfile: Dockerfile # these args configure private env vars for the backend and public env vars for the frontend args: ADMINUSER: admin ADMINEMAIL: "admin@example.com" ADMINPASSWORD: example_password # CHANGEME JWTSECRET: secret MAINDB: root:root@db:5432 # CHANGEME: 2nd 'root' is the password DBNAME: wafrn DOMAINNAME: localhost PORT: 9000 SMTPHOST: smtp.example.com SMTPUSER: wafrn SMTPPORT: 9003 SMTPPASSWORD: example_password # CHANGEME SMTPFROM: wafrn@example.com REDISHOST: redis REDISPORT: 6379 LOG_SQL_QUERIES: false # this makes the logs really heavy, but might be useful for debugging FRONTEND_PATH: "\\/wafrn\\/packages\\/frontend" # needs to be escaped for the sed command (\/) and yaml (\\) ## Uncomment and change these if you want to configure the frontend environment variables # FRONTEND_LOGO: "\\/assets\\/logo.png" # FRONTEND_URL: "localhost:9992" # FRONTEND_SHORTEN_POSTS: 3 # FRONTEND_DISABLE_PWA: false # FRONTEND_MAINTENANCE: false ## You can use a full URL in the next three if you want # FRONTEND_API_URL: "\\/api" # FRONTEND_CACHE_URL: "\\/api\\/cache?media=" # FRONTEND_MEDIA_URL: "\\/api\\/uploads" depends_on: - db - redis ports: - 9000:9000 restart: unless-stopped environment: - NODE_ENV=production volumes: - ./packages/backend/uploads:/wafrn/uploads - ./packages/backend/cache:/wafrn/cache frontend: build: context: . dockerfile: packages/frontend/Dockerfile # these args configure apache redirections and headers args: BACKEND_URL: backend:9000 # Important: Do not include the protocol (http://) here FRONTEND_URL: localhost:9992 ## Uncomment and change these if want to configure server name and admin email for apache # SERVER_NAME: localhost:9992 # ADMIN_EMAIL: admin@localhost:9992 ## Uncomment and change these if you have different URLs for the cache and media server # CACHE_URL: localhost:9992 # MEDIA_URL: localhost:9992 ports: - 9992:80 db: image: postgres:17 restart: always environment: POSTGRES_USER: root POSTGRES_PASSWORD: root POSTGRES_DB: wafrn volumes: - dbpg:/var/lib/postgresql ports: - 5432:5432 adminer: image: adminer restart: always ports: - 8080:8080 redis: image: redis:7.2.4 restart: always ports: - "6379:6379" volumes: dbpg: