Moved docker files to contrib, added documentation
This commit is contained in:
parent
d7ba51b3ec
commit
8ed3ed3a77
|
@ -1,2 +0,0 @@
|
|||
FROM nginx:alpine
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
13
README.md
13
README.md
|
@ -82,6 +82,19 @@ PRODUCTION_REMOTE # Same as STAGING_REMOTE but for the production environm
|
|||
PRODUCTION_REMOTE_PATH # Same as STAGING_REMOTE_PATH but for the production environment
|
||||
```
|
||||
|
||||
### Docker container
|
||||
To build the `engelsystem` and the `engelsystem-nginx` container:
|
||||
```bash
|
||||
cd contrib
|
||||
docker-compose build
|
||||
```
|
||||
|
||||
or to build the containers separately
|
||||
```bash
|
||||
docker build -f contrib/Dockerfile . -t engelsystem
|
||||
docker build -f contrib/nginx/Dockerfile . -t engelsystem-nginx
|
||||
```
|
||||
|
||||
#### deploy.sh
|
||||
The `deploy.sh` script can be used to deploy the engelsystem. It uses rsync to deploy the application to a server over ssh.
|
||||
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
version: "3.3"
|
||||
version: "3.6"
|
||||
services:
|
||||
nginx:
|
||||
image: engelsystem-nginx
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-proxy
|
||||
context: ..
|
||||
dockerfile: contrib/nginx/Dockerfile
|
||||
ports:
|
||||
- 5000:80
|
||||
volumes:
|
||||
- static:/var/www/html
|
||||
depends_on:
|
||||
- engelsystem
|
||||
engelsystem:
|
||||
build: ./
|
||||
image: engelsystem
|
||||
build:
|
||||
context: ..
|
||||
dockerfile: contrib/Dockerfile
|
||||
environment:
|
||||
MYSQL_HOST: db
|
||||
MYSQL_HOST: database
|
||||
MYSQL_USER: engelsystem
|
||||
MYSQL_PASSWORD: engelsystem
|
||||
MYSQL_DATABASE: engelsystem
|
||||
volumes:
|
||||
- static:/var/www/html
|
||||
db:
|
||||
depends_on:
|
||||
- database
|
||||
database:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_DATABASE: engelsystem
|
||||
|
@ -33,5 +41,5 @@ services:
|
|||
# ports:
|
||||
# - 8080:8080
|
||||
volumes:
|
||||
db: {}
|
||||
static: {}
|
||||
db: {}
|
||||
static: {}
|
|
@ -0,0 +1,2 @@
|
|||
FROM nginx:alpine
|
||||
COPY contrib/nginx/nginx.conf /etc/nginx/nginx.conf
|
Loading…
Reference in New Issue