Commit 85933f2c authored by David Haynes's avatar David Haynes 🙆
Browse files

Merge branch '154-docker-revision' into '2.3-dev'

Resolve "Revise docker implementation"

See merge request srct/go!108
parents 33cfc11b caf7edca
Pipeline #1621 passed with stages
in 2 minutes and 31 seconds
# Build on top of the python image and install any external packages
FROM python:3.6 FROM python:3.6
ENV PYTHONUNBUFFERED 1
RUN apt-get update RUN apt-get update
RUN apt-get install netcat -y RUN apt-get install netcat -y
RUN mkdir /go # Set enviornment variables
WORKDIR /go ENV PYTHONUNBUFFERED 1
ADD /requirements/ /go/
RUN pip install -r base.txt # Copy over all project files into /go/
RUN mkdir /go/
WORKDIR /go/
ADD . /go/ ADD . /go/
# Install pip dependecies
RUN pip install -r /go/requirements/dev.txt
...@@ -71,7 +71,6 @@ Windows Subsystem for Linux (WSL). The following link should get you up and runn ...@@ -71,7 +71,6 @@ Windows Subsystem for Linux (WSL). The following link should get you up and runn
[https://msdn.microsoft.com/en-us/commandline/wsl/install_guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) [https://msdn.microsoft.com/en-us/commandline/wsl/install_guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)
#### Contributing with Windows #### Contributing with Windows
After that is setup, you should be able to follow the Linux instructions for _manual setup_ to After that is setup, you should be able to follow the Linux instructions for _manual setup_ to
...@@ -133,12 +132,6 @@ Pros: ...@@ -133,12 +132,6 @@ Pros:
- Can easily destroy and rebuild the docker images - Can easily destroy and rebuild the docker images
- Loads in changes to code on the fly - Loads in changes to code on the fly
Cons:
- Challenging to debug problems
- Cannot interact with attached images and as a result, you cannot really
interact with the database.
There are instructions on how to setup/develop with Docker at the [docker-configuration page in the Go project wiki](https://git.gmu.edu/srct/go/wikis/docker-configuration). There are instructions on how to setup/develop with Docker at the [docker-configuration page in the Go project wiki](https://git.gmu.edu/srct/go/wikis/docker-configuration).
### Manual Setup ### Manual Setup
...@@ -207,9 +200,9 @@ use the same username and Full Name as your main account and select "approved" i ...@@ -207,9 +200,9 @@ use the same username and Full Name as your main account and select "approved" i
## Coding style ## Coding style
You should adhere to the style of the repo code. Consistancy is key! PEP8 guidelines You should adhere to the style of the repo code. Consistency is key! PEP8 guidelines
are strongly reccomended but not enforced at the time. Please comment your code, are strongly recommended but not enforced at the time. Please comment your code,
I will not accept commits that contain uncommented code. I will not accept commits that contain undocumented code.
## Getting Help ## Getting Help
......
version: '2' version: "3"
services: services:
db:
image: mysql
deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- gonet
ports:
- "3306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: go
MYSQL_USER: go
MYSQL_PASSWORD: go
web: web:
build: . image: go_web
restart: always deploy:
replicas: 1
restart_policy:
condition: on-failure
networks:
- gonet
ports: ports:
- '8000:8000' - '8000:8000'
command: /bin/bash ./startup.sh -python go/manage.py runserver 0.0.0.0:8000 command: /bin/bash ./startup.sh -python go/manage.py runserver 0.0.0.0:8000
...@@ -27,10 +48,5 @@ services: ...@@ -27,10 +48,5 @@ services:
- GO_EMAIL_TO= - GO_EMAIL_TO=
- superuser=dhaynes3 - superuser=dhaynes3
db: networks:
image: mysql gonet:
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: go
MYSQL_USER: go
MYSQL_PASSWORD: go
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment