-
-
Save WorkingMouse/0ad94814f21722bb77a8d6919111c977 to your computer and use it in GitHub Desktop.
SpringBot Project Docker Compose File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
db: | |
container_name: db | |
image: postgres:11 | |
environment: | |
POSTGRES_DB: codebots | |
POSTGRES_USER: codebots | |
POSTGRES_PASSWORD: bots | |
networks: | |
- bridge | |
ports: | |
- 54320:5432 | |
volumes: | |
- postgres-data:/var/lib/postgresql/data | |
pgAdmin: | |
container_name: pg_admin | |
image: dpage/pgadmin4 | |
environment: | |
PGADMIN_DEFAULT_EMAIL: codebots@example.com | |
PGADMIN_DEFAULT_PASSWORD: bots | |
PGADMIN_LISTEN_PORT: 9090 | |
networks: | |
- bridge | |
ports: | |
- 9090:9090 | |
server: | |
image: adoptopenjdk:11-jdk-hotspot-bionic | |
working_dir: /usr/src/app/ | |
command: bash -c " | |
sed -i 's/\x0D//' gradlew && | |
nohup ./gradlew bootRun & tail -f /dev/null" | |
container_name: serverside | |
environment: | |
DATA_SOURCE_URL: jdbc:postgresql://db:5432/codebots | |
DATA_SOURCE_USERNAME: codebots | |
DATA_SOURCE_PASSWORD: bots | |
SPRING_PROFILES_ACTIVE: dev | |
GRADLE_USER_HOME: /gradle_home | |
profile: dev | |
networks: | |
- bridge | |
depends_on: | |
- db | |
volumes: | |
- ./serverside:/usr/src/app | |
- gradle_cache:/usr/src/app/.gradle | |
- gradle_home:/gradle_home | |
ports: | |
- 8080:8080 | |
client: | |
image: node:10-alpine | |
working_dir: /usr/src/app | |
container_name: clientside | |
command: sh -c " | |
npm install -g @angular/cli; | |
npm rebuild node-sass; | |
npm install; | |
ng serve --host 0.0.0.0 --disableHostCheck" | |
ports: | |
- 8000:4200 | |
volumes: | |
- ./clientside:/usr/src/app/ | |
- node_modules:/usr/src/app/node_modules | |
networks: | |
bridge: | |
volumes: | |
node_modules: | |
gradle_home: | |
gradle_cache: | |
postgres-data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment