This commit is contained in:
André Menrath 2023-12-10 13:19:03 +01:00
parent f88fa91585
commit 9037f8825f
4 changed files with 26 additions and 49 deletions

View file

@ -1,26 +0,0 @@
_build
CONTRIBUTING.md
coverage
demo
deps
doc
docs
docker-compose.yml
Dockerfile
.elixir_ls
.formatter.exs
.git
.gitignore
.gitlab
.gitlab-ci.yml
.graphqlconfig.yaml
LICENSE
Makefile
README.md
SECURITY.md
ssh_match_hostname
package-lock.json
node_modules
playwright-report
test
tests

View file

@ -4,9 +4,9 @@ init:
setup: stop setup: stop
@bash mobilizon/mobilizon/docker/message.sh "Compiling everything" @bash mobilizon/mobilizon/docker/message.sh "Compiling everything"
docker-compose run --rm -e HEX_UNSAFE_HTTPS=1 mobilizon bash -c 'mix hex.config unsafe_https true; mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate' docker-compose run --rm mobilizon bash -c 'mix deps.get; npm ci; npm run build:pictures; mix ecto.create; mix ecto.migrate'
migrate: migrate:
docker-compose run --rm -e HEX_UNSAFE_HTTPS=1 mobilizon mix ecto.migrate docker-compose run --rm mobilizon mix ecto.migrate
logs: logs:
docker-compose logs -f docker-compose logs -f
start: stop start: stop

View file

@ -30,6 +30,8 @@ services:
- POSTGRES_PORT=5432 - POSTGRES_PORT=5432
volumes: volumes:
- mobilizon_database_data:/var/lib/postgresql/data - mobilizon_database_data:/var/lib/postgresql/data
ports:
- "5432:5432"
mobilizon: mobilizon:
container_name: mobilizon container_name: mobilizon
@ -42,6 +44,7 @@ services:
- "./mobilizon/dev.exs:/app/config/dev.exs" - "./mobilizon/dev.exs:/app/config/dev.exs"
- "./certs/lan-key.pem:/app/priv/server.key:ro" - "./certs/lan-key.pem:/app/priv/server.key:ro"
- "./certs/lan.pem:/app/priv/server.pem:ro" - "./certs/lan.pem:/app/priv/server.pem:ro"
- "/etc/ssl/certs/ca-certificates.crt:/app/priv/ca-bundle.crt:ro"
depends_on: depends_on:
- postgres - postgres
environment: environment:
@ -58,9 +61,8 @@ services:
MOBILIZON_DATABASE_DBNAME: mobilizon MOBILIZON_DATABASE_DBNAME: mobilizon
MOBILIZON_DATABASE_HOST: postgres MOBILIZON_DATABASE_HOST: postgres
MOBILIZON_DATABASE_PORT: 5432 MOBILIZON_DATABASE_PORT: 5432
HEX_UNSAFE_HTTPS: 1
VITE_HOST: 0.0.0.0 VITE_HOST: 0.0.0.0
command: sh -c "HEX_UNSAFE_HTTPS=1 mix phx.server" command: sh -c "mix phx.server"
expose: expose:
- "443" - "443"
- "4000" - "4000"
@ -73,8 +75,8 @@ services:
dockerfile: Dockerfile dockerfile: Dockerfile
volumes: volumes:
- ./wordpress/wordpress:/var/www/html - ./wordpress/wordpress:/var/www/html
- /etc/ssl/certs:/etc/ssl/certs:ro - /etc/ssl/certs/ca-certificates.crt:/var/www/html/wp-includes/certificates/ca-bundle.crt:ro
- /etc/ca-certificates/:/etc/ca-certificates/:ro
environment: environment:
- DOCKER_DEV_DOMAIN=wp.lan - DOCKER_DEV_DOMAIN=wp.lan
- WORDPRESS_DB_NAME=wordpress - WORDPRESS_DB_NAME=wordpress

View file

@ -8,6 +8,7 @@ http {
server_name wp.lan; server_name wp.lan;
listen 80; listen 80;
# return 301 https://$server_name$request_uri;
index index.php; index index.php;
location / { location / {
@ -18,23 +19,23 @@ http {
} }
} }
server { # server {
server_name wp.lan; # server_name wp.lan;
listen 443 ssl; # listen 443 ssl;
http2 on; # http2 on;
ssl_certificate /etc/nginx/certs/lan.pem; # ssl_certificate /etc/nginx/certs/lan.pem;
ssl_certificate_key /etc/nginx/certs/lan-key.pem; # ssl_certificate_key /etc/nginx/certs/lan-key.pem;
index index.php; # index index.php;
location / { # location / {
proxy_set_header X-Forwarded-For $remote_addr; # proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host; # proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme; # proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass "http://wordpress"; # proxy_pass "http://wordpress";
} # }
} # }
server { server {
server_name mz.lan; server_name mz.lan;