Merge branch 'master' into ivo/pinner

This commit is contained in:
Ivaylo Novakov 2022-05-24 11:44:03 +02:00
commit d33b7c8296
No known key found for this signature in database
GPG Key ID: 06B9354AB08BE9C6
4 changed files with 41 additions and 23 deletions

View File

@ -0,0 +1 @@
- Fix missing `logs` dir that is required for backup scripts (cron jobs).

View File

@ -22,7 +22,7 @@ services:
accounts: accounts:
# uncomment "build" and comment out "image" to build from sources # uncomment "build" and comment out "image" to build from sources
# build: https://github.com/SkynetLabs/skynet-accounts.git#main # build: https://github.com/SkynetLabs/skynet-accounts.git#main
image: skynetlabs/skynet-accounts image: skynetlabs/skynet-accounts:1.1.0
container_name: accounts container_name: accounts
restart: unless-stopped restart: unless-stopped
logging: *default-logging logging: *default-logging
@ -78,25 +78,27 @@ services:
depends_on: depends_on:
- mongo - mongo
dashboard-v2: # Do not build dashboard-v2 until we're ready to make a switch
build: # ============================================================
context: ./packages/dashboard-v2 # dashboard-v2:
dockerfile: Dockerfile # build:
container_name: dashboard-v2 # context: ./packages/dashboard-v2
restart: unless-stopped # dockerfile: Dockerfile
logging: *default-logging # container_name: dashboard-v2
env_file: # restart: unless-stopped
- .env # logging: *default-logging
environment: # env_file:
- GATSBY_PORTAL_DOMAIN=${PORTAL_DOMAIN} # - .env
- GATSBY_STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY} # environment:
volumes: # - GATSBY_PORTAL_DOMAIN=${PORTAL_DOMAIN}
- ./docker/data/dashboard-v2/.cache:/usr/app/.cache # - GATSBY_STRIPE_PUBLISHABLE_KEY=${STRIPE_PUBLISHABLE_KEY}
- ./docker/data/dashboard-v2/public:/usr/app/public # volumes:
networks: # - ./docker/data/dashboard-v2/.cache:/usr/app/.cache
shared: # - ./docker/data/dashboard-v2/public:/usr/app/public
ipv4_address: 10.10.10.86 # networks:
expose: # shared:
- 9000 # ipv4_address: 10.10.10.86
depends_on: # expose:
- mongo # - 9000
# depends_on:
# - mongo

View File

@ -36,6 +36,19 @@ else
exec 3>/dev/null exec 3>/dev/null
fi fi
# Really dirty backwards compatible workaround for single server portals:
# =======================================================================
# in the past we used to require single server portals not to include
# server domain env variable because it messed up with caddy; we switched
# to certbot and that is not the case any more but we also switched to
# using built in envsubst instead of custom mustache script for nginx
# templating and now when server domain is not defined, it messes up whole
# nginx config and nginx will not start; this workaround assigns portal
# domain as a server domain if server domain is not defined
if [ -z "${SERVER_DOMAIN}" ]; then
export SERVER_DOMAIN=${PORTAL_DOMAIN}
fi
if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then if [ "$1" = "nginx" -o "$1" = "nginx-debug" ]; then
if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then if /usr/bin/find "/docker-entrypoint.d/" -mindepth 1 -maxdepth 1 -type f -print -quit 2>/dev/null | read v; then
echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration" echo >&3 "$0: /docker-entrypoint.d/ is not empty, will attempt to perform configuration"

2
logs/.gitkeep Normal file
View File

@ -0,0 +1,2 @@
Purpose of this file is that `logs` dir can be commited to git and it will be
present on portal servers. The rest of files in `logs` dir are git ignored.