Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
Doorcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guardians of the Kretschmar Elock System
Doorcode
Commits
8e92ea58
Commit
8e92ea58
authored
Feb 17, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get website going with ssl
parent
90dcbf3e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
8 deletions
+49
-8
bin/dev-setup.sh
bin/dev-setup.sh
+6
-0
docker-compose.yml.example
docker-compose.yml.example
+18
-2
nginx/conf.d/app.conf
nginx/conf.d/app.conf
+10
-2
secrets/certs/.gitignore
secrets/certs/.gitignore
+2
-0
secrets/gen-certs.sh
secrets/gen-certs.sh
+9
-0
src/web/install-dev.sh
src/web/install-dev.sh
+4
-4
No files found.
bin/dev-setup.sh
0 → 100755
View file @
8e92ea58
#!/bin/bash
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
"
${
DIR
}
/../secrets/gen-certs.sh"
docker-compose
-f
"
${
DIR
}
/../docker-compose.yml"
up
-d
docker-compose
-f
"
${
DIR
}
/../docker-compose.yml"
exec
api ./install-dev.sh
docker-compose.yml.example
View file @
8e92ea58
version: '3'
version: '3
.7
'
networks:
doorcode:
driver: bridge
secrets:
webserver_cert:
file: ./secrets/certs/webserver.cert
webserver_key:
file: ./secrets/certs/webserver.key
volumes:
db-data:
services:
webserver:
image: nginx:1-alpine
container_name: webserver
restart: unless-stopped
tty: true
secrets:
- webserver_cert
- webserver_key
ports:
- "8080:
80
"
- "8080:
443
"
volumes:
- ./src/web:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
...
...
@@ -33,6 +45,8 @@ services:
tty: true
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: web
POSTGRES_PASSWORD: secret
...
...
@@ -46,6 +60,8 @@ services:
tty: true
ports:
- "8081:80"
depends_on:
- postgres
environment:
PHP_PG_ADMIN_SERVER_HOST: postgres
PHP_PG_ADMIN_SERVER_DEFAULT_DB: doorcode
...
...
nginx/conf.d/app.conf
View file @
8e92ea58
...
...
@@ -5,9 +5,13 @@ upstream localhost.api {
}
server
{
listen
80
;
listen
443
ssl
;
index
index
.
php
index
.
html
;
server_name
localhost
;
ssl_certificate
/
run
/
secrets
/
webserver_cert
;
ssl_certificate_key
/
run
/
secrets
/
webserver_key
;
error_log
/
var
/
log
/
nginx
/
error
.
log
;
access_log
/
var
/
log
/
nginx
/
access
.
log
;
root
/
var
/
www
/
frontend
;
...
...
@@ -48,9 +52,13 @@ server {
server
{
listen
80
;
listen
443
ssl
;
index
index
.
php
index
.
html
;
server_name
localhost
.
api
;
ssl_certificate
/
run
/
secrets
/
webserver_cert
;
ssl_certificate_key
/
run
/
secrets
/
webserver_key
;
error_log
/
var
/
log
/
nginx
/
error
.
log
;
access_log
/
var
/
log
/
nginx
/
access
.
log
;
root
/
var
/
www
/
backend
/
public
;
...
...
secrets/certs/.gitignore
0 → 100644
View file @
8e92ea58
*
!.gitignore
\ No newline at end of file
secrets/gen-certs.sh
0 → 100755
View file @
8e92ea58
#!/bin/bash
echo
"Generating cert for domain:
$1
"
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
openssl req
-new
-newkey
rsa:4096
-days
365
-nodes
-x509
\
-subj
"/C=US/ST=Washington/L=College Place/O=WWU/CN=
$1
"
\
-keyout
"
${
DIR
}
/certs/webserver.key"
-out
"
${
DIR
}
/certs/webserver.cert"
src/web/install-dev.sh
View file @
8e92ea58
#!/bin/bash
DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
>
/dev/null 2>&1
&&
pwd
)
"
# Install php dependencies
composer
install
-d
backend
composer
install
-d
"
${
DIR
}
/backend"
# configure the backend
cd
backend
||
exit
./configure.sh
"
${
DIR
}
/backend/configure.sh"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment