mirror of
https://github.com/standardnotes/server
synced 2026-01-16 20:04:32 -05:00
chore: add example local setup
This commit is contained in:
11
.env.sample
11
.env.sample
@@ -1,14 +1,3 @@
|
||||
###########
|
||||
# General #
|
||||
###########
|
||||
EXPOSED_PORT=3000
|
||||
|
||||
#########
|
||||
# FILES #
|
||||
#########
|
||||
EXPOSED_FILES_SERVER_PORT=3042
|
||||
PUBLIC_FILES_SERVER_URL=http://localhost:3042
|
||||
|
||||
######
|
||||
# DB #
|
||||
######
|
||||
|
||||
3
.github/workflows/common-e2e.yml
vendored
3
.github/workflows/common-e2e.yml
vendored
@@ -50,9 +50,6 @@ jobs:
|
||||
|
||||
- name: Run Server
|
||||
run: docker compose -f docker-compose.ci.yml up -d
|
||||
env:
|
||||
EXPOSED_PORT: 3123
|
||||
EXPOSED_FILES_SERVER_PORT: 3125
|
||||
|
||||
- name: Wait for server to start
|
||||
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -23,3 +23,5 @@ data/*
|
||||
|
||||
logs/*
|
||||
!logs/.gitkeep
|
||||
|
||||
docker-compose.yml
|
||||
|
||||
@@ -4,8 +4,8 @@ services:
|
||||
env_file: .github/ci.env
|
||||
container_name: server-ci
|
||||
ports:
|
||||
- ${EXPOSED_PORT}:3000
|
||||
- ${EXPOSED_FILES_SERVER_PORT}:3104
|
||||
- 3123:3000
|
||||
- 3125:3104
|
||||
volumes:
|
||||
- ./logs:/var/lib/server/logs
|
||||
networks:
|
||||
|
||||
62
docker-compose.example.yml
Normal file
62
docker-compose.example.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
services:
|
||||
server:
|
||||
image: standardnotes/server
|
||||
env_file: .env.sample
|
||||
container_name: server-self-hosted
|
||||
ports:
|
||||
- 3000:3000
|
||||
- 3125:3104
|
||||
volumes:
|
||||
- ./logs:/var/lib/server/logs
|
||||
networks:
|
||||
- standardnotes_self_hosted
|
||||
|
||||
localstack:
|
||||
image: localstack/localstack:1.3
|
||||
container_name: localstack-self-hosted
|
||||
expose:
|
||||
- 4566
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- SERVICES=sns,sqs
|
||||
- DOCKER_HOST=unix:///var/run/docker.sock
|
||||
- HOSTNAME_EXTERNAL=localstack
|
||||
- LS_LOG=warn
|
||||
volumes:
|
||||
- ./docker/localstack_bootstrap.sh:/etc/localstack/init/ready.d/localstack_bootstrap.sh
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
networks:
|
||||
- standardnotes_self_hosted
|
||||
|
||||
db:
|
||||
image: mysql:8
|
||||
container_name: db-self-hosted
|
||||
environment:
|
||||
- MYSQL_DATABASE=standard_notes_db
|
||||
- MYSQL_USER=std_notes_user
|
||||
- MYSQL_ROOT_PASSWORD=changeme123
|
||||
- MYSQL_PASSWORD=changeme123
|
||||
expose:
|
||||
- 3306
|
||||
restart: unless-stopped
|
||||
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci
|
||||
volumes:
|
||||
- ./data/mysql:/var/lib/mysql
|
||||
- ./data/import:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
- standardnotes_self_hosted
|
||||
|
||||
cache:
|
||||
image: redis:6.0-alpine
|
||||
container_name: cache-self-hosted
|
||||
volumes:
|
||||
- ./data/redis/:/data
|
||||
expose:
|
||||
- 6379
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- standardnotes_self_hosted
|
||||
|
||||
networks:
|
||||
standardnotes_self_hosted:
|
||||
name: standardnotes_self_hosted
|
||||
Reference in New Issue
Block a user