Tweaked docker-compose

This commit is contained in:
2021-03-07 13:52:51 +11:00
parent b08e099b1e
commit 83af2b1395
2 changed files with 7 additions and 9 deletions
+1 -3
View File
@@ -4,9 +4,7 @@ An API centric auth server. Uses Sequelize and mariaDB by default.
# Setup
TODO: Dockerize this project
TODO: Write setup instructions, once dockerized
There are multiple ways to run this app - it can run on it's own via `npm start` (for production) or `npm run dev` (for development). it can also run inside docker using `docker-compose up --build` - run `node configure-script.js` to generate docker-compose.yml.
# API
+6 -6
View File
@@ -54,7 +54,7 @@ const question = (prompt, def = null) => {
version: '3'
services:
app:
${appName}:
build:
context: .
ports:
@@ -90,14 +90,15 @@ services:
database:
image: mariadb:latest
environment:
MYSQL_DATABASE: ${appName}
MYSQL_USER: ${appDBUser}
MYSQL_PASSWORD: ${appDBPass}
MYSQL_ROOT_PASSWORD: ${dbRootPass}
- MYSQL_DATABASE: ${appName}
- MYSQL_USER: ${appDBUser}
- MYSQL_PASSWORD: ${appDBPass}
- MYSQL_ROOT_PASSWORD: ${dbRootPass}
networks:
- app-network
volumes:
- ./mysql:/var/lib/mysql
- ./startup.sql:/docker-entrypoint-initdb.d/startup.sql:ro
traefik:
image: "traefik:v2.4"
container_name: "traefik"
@@ -116,7 +117,6 @@ services:
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./startup.sql:/docker-entrypoint-initdb.d/startup.sql:ro"
networks:
- app-network
networks: